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.