Cache not cleared on start page when publish

Author Message

Ekkehard Dörre

Tuesday 13 December 2005 1:22:12 am

Hi,

There is a start page, which collects information from subfolders. It is called News and collects information with a modified folder.tpl: folder_start_news_de.tpl and fetch tree. So viewmode is "full" of {$module_result.content} and cached.

If I publish a new news, this node isn't cleared. If I publish via wait until date, same procedure. Other lists are cleared, but they are direct in pagelayout.tpl and not accessed via content/view/full

On possibility is to reduce caching time, which is bad for a start page

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

or this?

<b>Subtree Expiry</b>

Something inbetween the default policy of always expiring the cache blocks when content is published, and the functionality of "ignore_content_expiry" is the Subtree Expiry parameter. With this parameter you can control the expiration of a cache block when content in a specific subtree (like /products) is published. A real-life example might be where there is a block inside the pagelayout template which contains a list of the five last added products; in the following example the cache-block will be expired when there is something published in the /products/bargain subtre, or after 30 minutes:

{cache-block expiry=1800 subtree_expiry=/producs/bargain}

... tpl code

{/cache-block}

Which is the best way? There is a lot of traffic on this page.

Thanks, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Paul Forsyth

Tuesday 13 December 2005 1:36:19 am

If you disable the cache for the start page perhaps consider adding cache-blocks in those places that dont need to change? That way you can retain the dynamic fetch but cache everything else?

paul

Xavier Dutoit

Tuesday 13 December 2005 1:40:32 am

Doesn't work with the smart cache ?

if you enable the smart cache and says that everytime a new article (or whatever is published on the home page), you clear the cache of the home page, doesn't it work ?

Just remember that you have to put objects id, not node ids.

X+

http://www.sydesy.com

Ekkehard Dörre

Tuesday 13 December 2005 2:41:34 am

@Paul dynamic fetch is too heavy, but cache for 10 min is a possibility but not very elegant.

@Xavier
From
http://ez.no/products/ez_publish_cms/documentation/incoming/smart_viewcache_cleaning_system

[forum_reply]
DependentClassIdentifier[]
DependentClassIdentifier[]=folder
ClearCacheMethod=clear_object_and_relating_objects_caches
MaxParents=3;

#If 'Forum folder' has object_id=56 for example then the rule above can be more hard by adding next lines:
ObjectFilter[]
ObjectFilter[]=56

looks like a solution, but there is an unique fetch in viewmode full in folder and nothing related. Does this work, too?

Thanks, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Paul Forsyth

Tuesday 13 December 2005 3:07:33 am

Maybe we need a template operator to clear the cache of a node. The eZ api has this. So, in the pagelayout something like:

{if $some_condition}
{clear_cache_object(X)}
{/if}

may work if something can be tested.

Having a delay of 10 minutes isnt too bad. It means for most hits the cache will be in place and is fast. Fine tuning the time would be key.

btw, i added a relevant enhancment some time ago:

http://ez.no/community/bugs/smarter_viewcache

Paul

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 31 2025 07:02:51
Script start
Timing: Jan 31 2025 07:02:51
Module start 'layout'
Timing: Jan 31 2025 07:02:51
Module start 'content'
Timing: Jan 31 2025 07:02:51
Module end 'content'
Timing: Jan 31 2025 07:02:51
Script end

Main resources:

Total runtime0.0156 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.2656151.2266
Module start 'layout' 0.00470.0023 739.492236.6797
Module start 'content' 0.00710.0070 776.171998.3125
Module end 'content' 0.01410.0015 874.484437.9922
Script end 0.0156  912.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002213.9523140.0002
Check MTime0.00106.5539140.0001
Mysql Total
Database connection0.00106.329810.0010
Mysqli_queries0.002113.333330.0007
Looping result0.00000.076210.0000
Template Total0.00117.110.0011
Template load0.00085.389110.0008
Template processing0.00031.669310.0003
Override
Cache load0.00063.637510.0006
General
dbfile0.002515.839680.0003
String conversion0.00000.042740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs