Caching

How to stop PHP code output from caching in Drupal 8

But what if we want Drupal 8 caching to be LESS awesome?

Drupal 8 caching is awesome. I get it, and thank you to the community for that awesomeness.

For those of you wondering why your PHP code (probably entered into a block or a node using the PHP Input Filter) will not execute without clearing the cache in-between runs, this information is for you.

Early in Drupal 8 beta we were able to do things like set a block as non-cacheable. But as D8 development progressed that notion went away. Now you can make modules with awesome cache tagging and invalidation. But what you can't do is include PHP code in content using the infamous PHP filter and then have it execute on every page load. Caching won't run the code a second time the user loads your page.

Tags: 

Subscribe to RSS - Caching