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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 22:24:52
Script start
Timing: Jan 30 2025 22:24:52
Module start 'layout'
Timing: Jan 30 2025 22:24:52
Module start 'content'
Timing: Jan 30 2025 22:24:53
Module end 'content'
Timing: Jan 30 2025 22:24:53
Script end

Main resources:

Total runtime1.2477 sec
Peak memory usage8,192.0000 KB
Database Queries78

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.1563151.2109
Module start 'layout' 0.00600.0043 739.3672220.6875
Module start 'content' 0.01021.2364 960.05474,611.6953
Module end 'content' 1.24660.0010 5,571.750015.8438
Script end 1.2477  5,587.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2685160.0002
Check MTime0.00120.1000160.0001
Mysql Total
Database connection0.00080.060310.0008
Mysqli_queries1.145891.8313780.0147
Looping result0.00080.0609760.0000
Template Total1.187195.120.5935
Template load0.00160.131020.0008
Template processing1.185495.006920.5927
Template load and register function0.00150.118910.0015
states
state_id_array0.00190.153010.0019
state_identifier_array0.00200.162320.0010
Override
Cache load0.00140.1137460.0000
Sytem overhead
Fetch class attribute can translate value0.00160.128250.0003
Fetch class attribute name0.00240.1911100.0002
XML
Image XML parsing0.00380.303150.0008
class_abstraction
Instantiating content class attribute0.00000.0025130.0000
General
dbfile0.00500.3973250.0002
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs