Forums / General / view_cache and objects relations

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"

eZ debug

Timing: Jan 18 2025 04:24:59
Script start
Timing: Jan 18 2025 04:24:59
Module start 'content'
Timing: Jan 18 2025 04:24:59
Module end 'content'
Timing: Jan 18 2025 04:24:59
Script end

Main resources:

Total runtime0.8320 sec
Peak memory usage4,096.0000 KB
Database Queries210

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.8281180.8359
Module start 'content' 0.00530.7008 769.6641697.4844
Module end 'content' 0.70610.1257 1,467.1484345.0625
Script end 0.8319  1,812.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4523210.0002
Check MTime0.00140.1740210.0001
Mysql Total
Database connection0.00060.077710.0006
Mysqli_queries0.743389.34942100.0035
Looping result0.00220.26122080.0000
Template Total0.803696.620.4018
Template load0.00200.242420.0010
Template processing0.801696.347720.4008
Template load and register function0.00010.013610.0001
states
state_id_array0.00170.201010.0017
state_identifier_array0.00080.092820.0004
Override
Cache load0.00180.2133600.0000
Sytem overhead
Fetch class attribute can translate value0.00200.242850.0004
Fetch class attribute name0.00150.1760110.0001
XML
Image XML parsing0.00250.304550.0005
class_abstraction
Instantiating content class attribute0.00000.0031140.0000
General
dbfile0.00250.2970480.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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