Added ability to never cache twig. #1244
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes it possible to cache content, but always process twig. Useful for regular but especially modular pages.
Enabling this will allow you to add a processing logic that can change dynamically on each page load, rather than caching the results and storing it for each page load.
This can be enabled/disabled site-wide in the
system.yaml
, or on a specific page.This allows twig logic to be processed on every page load even if the page is a modular subpage. This is similar to disabling the cache completely, however, cache is still used to store the regular content that has been processed by markdown, plugins, etc. So performance is better than disabling the cache, but not as good as caching content+twig processing.
NOTE: This is not compatible with
twig_first: true
currently because all processing is happening in the one Twig call.It might be possible to refactor the twig processing to handle page processing and modular processing independently. I can look at this later.
Please test!