Clean cache with PHP code

Author Message

Emmanuel LOREAL

Sunday 22 March 2009 11:18:46 am

Hello,

I use ezPublish 4.0.1

I have created two actions for a guestbook module, ActionPublier and ActionNePasPublier, which change the is_publie attribute of my message_livre object from 2 to 0 or from 2 to 1.

My actions are in my content_actionhandler.php, they work fine, but after my objects are updated, i would like to refresh the view cache of the visitors page where the guestbook messages are displayed, so that the new published messages appear!

The nodeID of this page is 157 and the corresponding objectID is 160.

I have tried :

eZContentCache::cleanup( array( 157 ) );
eZContentObjectTreeNode::clearViewCacheForSubtree( 157, true );
eZContentCacheManager::clearObjectViewCache($objectID,true,array(157));
eZContentCacheManager::clearContentCache($objectID,true,array(157));
eZContentCacheManager::clearContentCache(160);
eZContentCacheManager::clearTemplateBlockCache(160);

But nothing refreshes the cache of the visitors page.
In the admin site acess, the object is refreshed, but not in the visitors site access.

What should i do?? heeeeeeeeeeeeeeeeeelppp! :)

Thankx.

meriam santos

Thursday 30 April 2009 4:50:45 pm

Hi,

Just want to ask if you were able to get the answet to this problem?

i also had the same problem. i have updated/deleted an object - i have 7 before then updated to 5 now. when i run my cronjob for deleting old nodes. it still says it found 7 items. where in fact i only have 5.

how can this be updated? do i need to compile the program - cronexpire.php?

please reply. just needed some answers..

thanks,
iam

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