You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the timber/output filter to modify output after it has been rendered. I can see that this filter is applied to Timber's output after the output has been cached. Therefore the filter will be run every time, regardless if the original output is cached or not.
This is great for filters that dynamically change content; however for deterministic filters it's a bit inefficient. In my specific case I use timber/output with a HTML minification library to clean up whitespace; obviously if the un-minified output is already being cached it seems inefficient to not also cache the minified render.
Could an additional filter for $output be added immediately after the template is rendered, and before the cache is set? Perhaps something like timber/output/pre-cache
The text was updated successfully, but these errors were encountered:
Hi @jl-a , thank you for your issue and welcome at Timber. Please fill in the full issue report next time so we know what we're working with. But in this case you seem pretty sure where a changes has to be made. Would you like to create a Pull Request to add this filter?
I use the
timber/output
filter to modify output after it has been rendered. I can see that this filter is applied to Timber's output after the output has been cached. Therefore the filter will be run every time, regardless if the original output is cached or not.This is great for filters that dynamically change content; however for deterministic filters it's a bit inefficient. In my specific case I use
timber/output
with a HTML minification library to clean up whitespace; obviously if the un-minified output is already being cached it seems inefficient to not also cache the minified render.Could an additional filter for
$output
be added immediately after the template is rendered, and before the cache is set? Perhaps something liketimber/output/pre-cache
The text was updated successfully, but these errors were encountered: