Need help to write a cache rule

Author Message

Sébastien Antoniotti

Wednesday 17 January 2007 12:52:28 am

Hi,

I usually use the viewcache.ini to configure automatic cache cleaning when I publish objects, and it works well with simple rules.

But I have now a problem with a more complex situation :

eZPublish(nodeID = 2, class_identifier = folder) 
|
|-- Antenne(nodeID = 20, class_identifier = folder)  
     |
     |-- Rock Alive(nodeID = 84, class_identifier = emission)        
     |
     |-- Rock Alive(nodeID = 135, class_identifier = folder)
          |
          |-- List 1(nodeID = 150, class_identifier = list_rock)       
          |
          |-- List 2(nodeID = 151, class_identifier = list_rock)   

The full view of the Rock Alive emission (84) list the list_rock nodes located in the Rock Alive folder by fetching them. And the problem is that when a new list_rock is added, she don't appears in the full view of emission 84.

So i need to write a rules who clear the emission 84 when a lost_rock is published. emission 84 will never be deleted, so we can write a rule based on their node id (84).

Here a test rule which don't work :

[list_rock]
DependentClassIdentifier[]
DependentClassIdentifier[]=emission
DependentClassIdentifier[]=folder
MaxParents=2
ClearCacheMethod[]
ClearCacheMethod[]=clear_object_and_relating_objects_caches 

Thanks in advance !!

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Friday 19 January 2007 2:01:10 am

(up)

eZ Publish Freelance
web : http://www.webaxis.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 19 2025 13:44:00
Script start
Timing: Jan 19 2025 13:44:00
Module start 'layout'
Timing: Jan 19 2025 13:44:00
Module start 'content'
Timing: Jan 19 2025 13:44:01
Module end 'content'
Timing: Jan 19 2025 13:44:01
Script end

Main resources:

Total runtime0.8568 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.1484152.6250
Module start 'layout' 0.00540.0033 741.773439.4453
Module start 'content' 0.00860.8467 781.2188491.0859
Module end 'content' 0.85530.0014 1,272.30478.1641
Script end 0.8567  1,280.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3661160.0002
Check MTime0.00130.1464160.0001
Mysql Total
Database connection0.00080.090610.0008
Mysqli_queries0.815495.1787520.0157
Looping result0.00030.0398500.0000
Template Total0.827596.620.4137
Template load0.00190.217420.0009
Template processing0.825696.364420.4128
Template load and register function0.00010.010610.0001
states
state_id_array0.00070.086410.0007
state_identifier_array0.00070.078920.0003
Override
Cache load0.00150.1699160.0001
Sytem overhead
Fetch class attribute can translate value0.00050.056310.0005
Fetch class attribute name0.00100.116730.0003
XML
Image XML parsing0.00050.053310.0005
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00200.2284160.0001
String conversion0.00000.000740.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs