ezpublish-legacy
ezpublish-legacy copied to clipboard
Fix EZP-16874: view cache file written when cache_ttl=0 is set in tem…
Fix the issue: if {set-block scope=global variable=cache_ttl}0{/set-block} is set in view full template, no cache file should be generated to reduce io write calls and storage size
I'm not sure I remember the details right, but I think we changed it to write a file to avoid cache_ttl=0 taking down the servers, I might mix up with http error responses. Cause if the file is there advising no cache, then no lock will be created while generating cache. But it is a long time ago. @bdunogier might remember, but git history/blame might also on this and related files.
@andrerom if the viewcache file is needed for performance reasons, why not use one empty temp cachefile for all viewcaches with cache_ttl=0?
It can probably be optimized to not store anything else then the noCache flag and other relevant meta data indeed. Changes to all handlers and cluster handler code is probably needed for that.
Afaik, the cache generation was intentional and comes from https://jira.ez.no/browse/EZP-14850