Forums / Developer / How to invalidate cache for one subtemplate
Pierre Tissot
Friday 31 October 2008 8:58:41 am
Hi
I have a site where the products are Ez obejcts, but the price exist in other place, so I made a sub template price.tpl, where there is a custum fuction template made by me that is going to fecth the price elsewhere. The problem is that the cache is done for the entire set of template that build the page, and the command
{set-block scope=root variable=cache_ttl}0{/set-block}
invalidate not only my cache template, but all the contentView cache of this page. Is there any way of saying to easy: "Please don't cache this small block or template"?
thanks in advancePierre Tissot
André R.
Friday 31 October 2008 2:24:00 pm
Not possible. I'm afraid you'll have to rethink your code logic, first: why do you need to disable the cache?The price changes every second? If not consider setting ttl to something like 1 hour (3600) or 10 minutes (600).
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Piotrek Karaś
Tuesday 18 November 2008 8:47:38 pm
Consider dynamic injection of data into cached template from a non-cached part of pagelayout with JavaScript.
-- Company: mediaSELF Sp. z o.o., http://www.mediaself.pl eZ references: http://ez.no/partners/worldwide_partners/mediaself eZ certified developer: http://ez.no/certification/verify/272585 eZ blog: http://ez.ryba.eu