Invalidating an objects cache in PHP

Author Message

Paul Forsyth

Sunday 25 July 2004 12:52:29 pm

Is there an easy way to invalidate an object or nodes cache such that when it is next viewed the cache for it has to be rebuilt?

I have a case where im changing the attributes of some objects, which are displayed in the admin. After i store the attributes the main node view for that object doesnt update because of cache.

Is there a simple way to handle this?

paul

--
http://www.visionwt.com

Bård Farstad

Wednesday 18 August 2004 12:21:11 am

Hi Paul,

If you know the node id's you can use the following function to delete the view cache. The numbers in the array are node id's.

eZContentCache::cleanup( array( 42, 1024 ) );

--bård

Documentation: http://ez.no/doc

Paul Forsyth

Wednesday 18 August 2004 12:48:09 am

Excellent, thank you. I'll give this a try.

paul

--
http://www.visionwt.com

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