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.

eZ debug

Timing: Jan 18 2025 22:21:53
Script start
Timing: Jan 18 2025 22:21:53
Module start 'layout'
Timing: Jan 18 2025 22:21:53
Module start 'content'
Timing: Jan 18 2025 22:21:54
Module end 'content'
Timing: Jan 18 2025 22:21:54
Script end

Main resources:

Total runtime0.6493 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 591.6484152.6406
Module start 'layout' 0.00560.0020 744.289139.4609
Module start 'content' 0.00760.6404 783.7500533.8672
Module end 'content' 0.64800.0013 1,317.617212.1406
Script end 0.6493  1,329.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4945160.0002
Check MTime0.00130.2031160.0001
Mysql Total
Database connection0.00070.112910.0007
Mysqli_queries0.600092.4081570.0105
Looping result0.00060.0896550.0000
Template Total0.620495.520.3102
Template load0.00230.346820.0011
Template processing0.618195.192820.3091
Template load and register function0.00020.036610.0002
states
state_id_array0.00090.136610.0009
state_identifier_array0.00090.135420.0004
Override
Cache load0.00190.2968190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.109220.0004
Fetch class attribute name0.00210.317140.0005
XML
Image XML parsing0.00060.099720.0003
class_abstraction
Instantiating content class attribute0.00000.001640.0000
General
dbfile0.00140.2136170.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs