Clear cache when updating children of embed object

Author Message

Marko Žmak

Friday 06 March 2009 8:54:49 am

I'm looking for a solution of a problem, here's an example...

I have a Gallery class that displays it's children of class Image. Each gallery can be inserted into a XML field of any other object, as embed object. When embed into a XML field the gallery also displays it's children of class Image. What I want to do is this:

- when an image is added (or deleted/updated) as a child to a gallery, the cache of all objects that have this gallery in XML field as embed object should be automatically cleared

How can this be done using eZ cache settings? Maybe SmartCache?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Jean-Yves Zinsou

Saturday 07 March 2009 9:20:12 am

hello,

Yeah, i would say smart cache is the way:
http://ez.no/doc/ez_publish/technical_manual/3_9/features/view_caching/smart_view_cache_cleaning

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.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:09:58
Script start
Timing: Jan 18 2025 22:09:58
Module start 'layout'
Timing: Jan 18 2025 22:09:58
Module start 'content'
Timing: Jan 18 2025 22:09:59
Module end 'content'
Timing: Jan 18 2025 22:09:59
Script end

Main resources:

Total runtime0.8602 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.2734152.6406
Module start 'layout' 0.00620.0030 741.914139.4766
Module start 'content' 0.00920.8493 781.3906533.7500
Module end 'content' 0.85850.0016 1,315.14068.1250
Script end 0.8601  1,323.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3884160.0002
Check MTime0.00130.1509160.0001
Mysql Total
Database connection0.00100.115110.0010
Mysqli_queries0.813794.5959540.0151
Looping result0.00070.0812520.0000
Template Total0.829096.420.4145
Template load0.00200.237420.0010
Template processing0.827096.142020.4135
Template load and register function0.00010.009810.0001
states
state_id_array0.00080.087410.0008
state_identifier_array0.00100.115920.0005
Override
Cache load0.00160.1907130.0001
Sytem overhead
Fetch class attribute can translate value0.00080.087520.0004
Fetch class attribute name0.00120.144440.0003
XML
Image XML parsing0.00240.280420.0012
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00310.3566240.0001
String conversion0.00000.001240.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
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs