view_cache and objects relations

Author Message

Guillaume Kulakowski

Monday 26 May 2008 6:10:01 am

Hello,

I have a viewcaching problem.

This is my structure :
/ Root
/ Root / My Site 1 / Object1
/ Root / Common / Object2
/ Root / Common / Object3

I have some objects relations :
- Object1 -> Object2
- Object1 -> Object3
- Object2 -> Object3

When I edit "Object3" :
- Object1's viewcache is cleared : OK
- Object2's viewcache is cleared : OK
- Object3's viewcache is cleared : OK

When I add or delete an element in "Object3" :
- Object1's viewcache is not cleared : KO
- Object2's viewcache is not cleared : OK
- Object3's viewcache is not cleared : OK

Is there a solution for clear Object1's viewcache when I add an element in Object3 ?
For some reason, http://ez.no/doc/ez_publish/technical_manual/4_0/features/view_caching/smart_view_cache_cleaning#eztoc86277_4 is not a good solution for me

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Maxime Thomas

Monday 26 May 2008 11:36:10 pm

Hi LLaumgui,

Do you use Smart Cache ? If yes youu can specify explicitly what object you would like to refresh :

http://ez.no/doc/ez_publish/technical_manual/4_0/features/view_caching/smart_view_cache_cleaning

One things that is sure, it's each time a brain-teaser !

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Guillaume Kulakowski

Tuesday 27 May 2008 12:45:03 am

Hi Maxime,

The Object1 -> Object2 relation is an embed relation. I can embeded Object2 anywhere... I can't use AdditionalObjectIDs[] because I can't determine the ObjectIDs.

Thx

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

André R.

Tuesday 27 May 2008 12:53:07 am

The view cache does not currently support clearing cache on the relations on the parent node.
This is a so called indirect relations, and you should:
A. Avoid a page logic that needs this
or
B. Use specific classes for the relations and turn of view cache on those full view class templates and use cache-blocks instead.
Aka:

{set-block scope=global variable=cache_ttl}0{/set-block}

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

Guillaume Kulakowski

Thursday 29 May 2008 2:00:02 am

thx André...

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Bayron Guevara

Friday 13 June 2008 8:59:59 am

Hello, what relation type do you use? see http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/content_management/object_relations
for more information. There is a configuration directive called ClearRelationType in viewcache.ini, here you can especify which relation type you wish when use Smart View Cache System.

Web Developer & Modern Philosopher
Visit http://www.laprensa.hn, http://www.diez.hn, http://www.estilo.hn

Guillaume Kulakowski

Tuesday 17 June 2008 8:25:14 am

Thank Bayron,

I have tried this solution but I would like a cleaning cache when I add a children to the node related...

Your solution works fine if I edit the node. Not if I add a children into...

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

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 11:11:40
Script start
Timing: Jan 18 2025 11:11:40
Module start 'layout'
Timing: Jan 18 2025 11:11:40
Module start 'content'
Timing: Jan 18 2025 11:11:41
Module end 'content'
Timing: Jan 18 2025 11:11:41
Script end

Main resources:

Total runtime0.7675 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.9141152.6250
Module start 'layout' 0.00730.0034 740.539139.4453
Module start 'content' 0.01080.7551 779.9844692.4063
Module end 'content' 0.76590.0015 1,472.390620.1563
Script end 0.7674  1,492.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5197160.0002
Check MTime0.00140.1794160.0001
Mysql Total
Database connection0.00100.132210.0010
Mysqli_queries0.676888.1835730.0093
Looping result0.00090.1186710.0000
Template Total0.733095.520.3665
Template load0.00210.279620.0011
Template processing0.730995.230320.3654
Template load and register function0.00020.024010.0002
states
state_id_array0.00100.134310.0010
state_identifier_array0.00060.082520.0003
Override
Cache load0.00200.2542600.0000
Sytem overhead
Fetch class attribute can translate value0.00230.296640.0006
Fetch class attribute name0.00270.3519110.0002
XML
Image XML parsing0.00781.019240.0020
class_abstraction
Instantiating content class attribute0.00000.0042140.0000
General
dbfile0.00680.8808370.0002
String conversion0.00000.001540.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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/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: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs