ez.no / ezpublish / documentation / incoming / how to set cache expire time or disable cache in template?
These documentation pages are no longer maintained. Please visit the new documentation site.
After version 3.2, it is possible to set cache expire time or disable cache for specified contents.
For example, suppose that you have overrided templates article.tpl, folder.tpl, image.tpl and you have enabled view cache. If you want to all articles updated every 5 minutes, all folders updated every 10 minutes and no cache at all for all images, you can do like this:
In the beginning of article.tpl, add the following line:
{set-block scope=root variable=cache_ttl}300{/set-block}
In the beginning of folder.tpl, add the following line:
{set-block scope=root variable=cache_ttl}600{/set-block}
And in the beginning of image.tpl, add following line:
{set-block scope=root variable=cache_ttl}0{/set-block}
( 300 = 5 minutes, 600 = 10 minutes )
For all other contents, the cache system will work as usual.
Comments