Issues with view caching

Author Message

Julien Renard

Thursday 17 September 2009 12:22:49 am

Hi!
I'm developping a site and I have the following issue.
When I update a published object in admin interface, the content actually updates when I display directly the content throught $module_result.content, but, as I need to do so, it unfortunately doesnt update, and show the older contents when I fetch it outside of $module_result.content.
How is it so and how can I force it to act otherwise, other than disabling the cache which would severely alter the performances.

Marcel Marnet

Thursday 17 September 2009 12:51:26 am

Hello Julien,

if you publish an object, just the cache of itself and the cache of the parent-object will be cleared. At other nodes, you will see the older content.
Have a look at the viewcache.ini in the settings directory, there you're able to set which cache eZ should clear, when you publish an object.

with best regards,

Marcel

Xavier Serna

Thursday 17 September 2009 1:41:49 am

Hi Julien,

If you are outside the $module_result.conent and are seeing obsolete content, probably you're doing these fetch's inside a cache-block. As Marcel says, you have to check viewcache settings to be sure all needed caches are cleared, but also, you have to be sure that there is not a cache block generated that is caching your obsolete content.

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

André R.

Thursday 17 September 2009 1:47:02 am

As in: your not supposed to have a cache-block around $module_result.content, it will break your site, and $module_result.content is cached by view cache anyway.

But you say outside of $module_result.content, are your talking about when you fetch the node directly somewhere? Where and how do you do that?
In another nodes template? Or inside cache block of pagelayout?

If first case, then you should use relations instead to be able to take advantage of the view cache clearing rules of viewcache.ini.

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

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:06:58
Script start
Timing: Jan 18 2025 11:06:58
Module start 'layout'
Timing: Jan 18 2025 11:06:58
Module start 'content'
Timing: Jan 18 2025 11:07:00
Module end 'content'
Timing: Jan 18 2025 11:07:00
Script end

Main resources:

Total runtime1.7975 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0391152.6250
Module start 'layout' 0.00680.0057 741.664139.4453
Module start 'content' 0.01251.7832 781.1094625.2734
Module end 'content' 1.79570.0017 1,406.382812.4766
Script end 1.7974  1,418.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.1794160.0002
Check MTime0.00130.0704160.0001
Mysql Total
Database connection0.00150.081710.0015
Mysqli_queries1.729496.2113640.0270
Looping result0.00090.0498620.0000
Template Total1.745597.120.8728
Template load0.00250.140120.0013
Template processing1.743096.967720.8715
Template load and register function0.00020.012010.0002
states
state_id_array0.00120.067810.0012
state_identifier_array0.00210.118020.0011
Override
Cache load0.00200.1100240.0001
Sytem overhead
Fetch class attribute can translate value0.00120.064640.0003
Fetch class attribute name0.00140.079460.0002
XML
Image XML parsing0.00200.113840.0005
class_abstraction
Instantiating content class attribute0.00000.000660.0000
General
dbfile0.00140.0760230.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs