This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » How to invalidate cache for one...
expandshrink

How to invalidate cache for one subtemplate

How to invalidate cache for one subtemplate

Friday 31 October 2008 4:58:41 pm - 2 replies

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 advance
Pierre Tissot

Friday 31 October 2008 10: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).

Wednesday 19 November 2008 5:47:38 am

Consider dynamic injection of data into cached template from a non-cached part of pagelayout with JavaScript.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from