Ezcache : clear an object from the cache

Author Message

Peretjatko Alexandre

Monday 19 May 2008 12:57:05 am

Hi,

I'm looking for a way to clear an object ( with his objectID ) from the cache in a PHP script.
I guess there is a function in the ezcache class, but wich one ? Is there a sample code somewhere that I can use ?

Thanks for your help.

Alex.

Regards

Alex.
--------------------------------------------------------------
Personnal website : http://www.alex-design.fr

André R.

Monday 19 May 2008 3:32:04 am

eZContentCacheManager::clearContentCache( $contentObject->attribute( 'id' ), true, false );

The third parameter can be a list of node id's you also want to clear.

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

Peretjatko Alexandre

Monday 19 May 2008 5:05:39 am

Hi André,

In fact, I've found : eZContentCacheManager::clearObjectViewCache( $p_STR_MyObjectID, true, false ); wich seems to do the same, except I clear the view cache instead of the content object cache.

What function do I have to use to improve my server performance ?
My context is : I need to clear the cache after updating an objet with a XajaX request.

Regards

Alex.

Regards

Alex.
--------------------------------------------------------------
Personnal website : http://www.alex-design.fr

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