Forums / Developer / Invalidating an objects cache in PHP

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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