Clear Cache upon content modification

Author Message

Don Blogger

Friday 11 June 2010 7:33:08 am

Hi,

Is there a way to clear the cache automatically as soon as a user has modified some content? I keep hearing from clients they forget about clearing the cache manually ...

TIA,

DB

Robin Muilwijk

Friday 11 June 2010 11:57:06 am

Hi Don,

As far as I know cache is cleared when you publish new versions of content. See http://ez.no/doc/ez_publish/technical_manual/4_x/features/view_caching/smart_view_cache_cleaning.

There should be no need to empty the cahce manually.

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

André R.

Friday 11 June 2010 4:24:13 pm

As long as you don't fetch unrelated (As in not related, sibling, parent or child as you can define as cache clearing rules in viewcache.ini. Look at settings/viewcache.ini for info) content form within templates of a node view you should be fine. As for pagelayout you should be able to use subtree param and keys to avoid most of the outdated cache issues as long as you plan ahead while developing.

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

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 18 2025 02:59:10
Script start
Timing: Jan 18 2025 02:59:10
Module start 'layout'
Timing: Jan 18 2025 02:59:10
Module start 'content'
Timing: Jan 18 2025 02:59:11
Module end 'content'
Timing: Jan 18 2025 02:59:11
Script end

Main resources:

Total runtime0.7722 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0041 589.1484152.6406
Module start 'layout' 0.00410.0023 741.789139.4766
Module start 'content' 0.00640.7643 781.2656579.0547
Module end 'content' 0.77060.0015 1,360.320312.1406
Script end 0.7721  1,372.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3719160.0002
Check MTime0.00120.1494160.0001
Mysql Total
Database connection0.00070.093210.0007
Mysqli_queries0.725393.9256590.0123
Looping result0.00070.0892570.0000
Template Total0.748797.020.3743
Template load0.00190.240320.0009
Template processing0.746896.714220.3734
Template load and register function0.00020.032010.0002
states
state_id_array0.00050.063610.0005
state_identifier_array0.00090.111120.0004
Override
Cache load0.00150.1937160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.076330.0002
Fetch class attribute name0.00190.250350.0004
XML
Image XML parsing0.00150.189530.0005
class_abstraction
Instantiating content class attribute0.00000.001750.0000
General
dbfile0.00250.3192250.0001
String conversion0.00000.000940.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs