Forums / Setup & design / Clearing only one template cache

Clearing only one template cache

Author Message

H-Works Agency

Tuesday 30 August 2005 12:12:14 pm

Is it possible to clear only the cache for one template ? In this case its an override folder template for my homepage.

Cause when i try to clear "override tpl or template" it doesn't change anything : It always display the old tpl that is in cache.

Thanx for the help

EZP is Great

Roy Bøhmer

Tuesday 30 August 2005 12:23:19 pm

If you have set your settings to compile templates you probably have to clear the compilations before you'll se any change.

I might be really off track, but thats my best shot at the moment..

Roy

H-Works Agency

Thursday 06 October 2005 6:34:16 am

So i still have two questions :

- How can i clear one node's template cache ?
- Why my homepage's dynamic content never updates ?

For example i have a news panel on the homepage but when cache is on, the content never updates their though its updated in my news section. Why ?

Thanx for the help & for this incredible system.

EZP is Great

Arran Price

Sunday 09 October 2005 5:30:51 pm

Hi Martin,
Im not quite sure on your specific situation, however:
Does your content update if you clear the caches in ezpublish and hit refresh in the browser when viewing the page?
In some situations you may want to override caching of the template entirely as you can get strange behaviour.
In the few templates I need to do this, I use the following code at the top of the template.

   {set-block scope=root variable=cache_ttl}0{/set-block}

hope thats of some help.

If its not, you may want to explain your template set up a little more so people can help a little better. ie are you calling multiple templates? passing parameters between them etc?

cheers

Arran

H-Works Agency

Tuesday 25 October 2005 3:05:18 am

The point is very simple : contents on my homepage never update when cache is on.

EZP is Great

Marko Žmak

Tuesday 25 October 2005 12:38:33 pm

Did you tray clearing ALL the cache? also do you have the right permissions on the files on the server, so that PHP can delete them?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

H-Works Agency

Wednesday 26 October 2005 9:09:04 am

All permissions are ok - Well i have a homepage with an 'list fetch' that retrieve a news list.

When cache is 'on' this news list never update though the contents in other page of the site are updated. So this problem only occurs on the homepage.

To be able to see the new contents on my homepage, i have to "clear content cache" or "clear all cache".

Why is my homepage is not updating as the rest of the site ?

Second question is : "How can i clear only one page cache ? For exemple : 'clearcache /news/teams/'

EZP is Great

Konrad Mazurkiewicz

Wednesday 26 October 2005 2:05:57 pm

Hi Martin,
if you're using cache-block in pagelayout.tpl try check if they has correct keys.
If you have few blocks with the same key, try to separate them using different keys.