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.