Forums / Developer / Avoiding caching within a subtree?

Avoiding caching within a subtree?

Author Message

Clemens T

Thursday 07 February 2008 12:06:29 am

Hello all,

I'm having the following issue. When creating new users through PHPcode in a node in the Users tree via an extension the subtree of the node where that user is created in, is never cleared from cache. Right now I have to do this manually, to make sure the latest data is available to the users. Is it possible to do a cache refresh after every user I create in my code, or is it better to avoid caching at all on this subtree? If so: how?

Thanks!!
Clemens

Ɓukasz Serwatka

Friday 08 February 2008 12:55:57 am

Hi,

I assume that you know that subtree ID. then in PHP you can just clear view cache like:

eZContentCache::cleanup( array( $nodeID ) );

Remember include that class.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Clemens T

Tuesday 12 February 2008 1:11:23 am

Great stuff!! That's it. Works like a charm :).