Cache-block and dynamic pages

Author Message

Olav Bringedal

Wednesday 14 September 2005 3:54:36 am

Im trying to get better caching of the site im building.

I figured that wrapping {$module_result.content} with {cache-block keys=$uri_string} in pagelayout.tpl was a great way. That was until I realized that this would not take offset of folder teplates into account. So i made it
{cache-block keys=array($uri_string, $view_parameters.offset}, which worked reasonably well.

However problem is that it caches things like basket, custom modules, user profile so it becomes pretty useless on my site.

Can anyone offer any experiences with this kind of caching?, and if there is a way to override it for certain classes/nodes/urls?


Senior Consultant
http://Umoe-consulting.no

Olav Bringedal

Wednesday 14 September 2005 4:51:38 am

Ugly, but this seems to work :)

{section show=$module_result.uri|eq('/news/shop/basket')}
     {$module_result.content}
{section-else}
     {cache-block keys=array($uri_string, $view_parameters.offset)}
     {$module_result.content}
     {/cache-block}
{/section}


Senior Consultant
http://Umoe-consulting.no

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.