Delete cache of a node that shows some objects

Delete cache of a node that shows some objects

Wednesday 24 August 2011 3:55:50 am - 4 replies

Author Message

Hamdi Laadhari

Wednesday 24 August 2011 4:16:00 am

Have a look at the smartCacheClear feature of ezpublish

Certified eZ Publish Entreprise 4.5
http://www.laadhari.fr

Jerome Despatis

Wednesday 24 August 2011 4:46:49 am

Yes but what rule would you put ?

I have no relation between my page and the objects shown on it

Would be nice for me to tell eZ to expire all cache of a specific node whenever a new version of an object of a specific class is created

Daniel A. Øien

Wednesday 24 August 2011 5:54:19 am

You need to put the object ID of the node in the appropriate class section in settings/override/viewcache.ini.append.php. For example, if your node is an object of the article class:

[article]
DependentClassIdentifier[]=folder
DependentClassIdentifier[]=frontpage
ClearCacheMethod[]=object
ClearCacheMethod[]=parent
ClearCacheMethod[]=siblings
ClearCacheMethod[]=relating
AdditionalObjectIDs[]
AdditionalObjectIDs[]=xxxx

Also, you need to have smart Cache clearing enabled in settings/siteaccess/<your_admin_siteaccess>/viewcache.ini.append.php:

[ViewCacheSettings]
SmartCacheClear=enabled

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

Jerome Despatis

Wednesday 24 August 2011 9:55:26 am

Thanks Daniel,

I have a last problem: the page that performs some objects, shows objects AND also drafts

And as I can see on viewcache, the rules from viewcache.ini are followed for newly published object right ?

So I guess that even if I find the good setting for viewcache, whenever I create a draft, my page won't show those ones right ?

For now, I've disabled the cache for this page, as I haven't found a better option... tell me if I'm wrong!

with ViewCacheTweaks[236]=disabled

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

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