cache-blocking slow on templates associated with $module_result.content

Author Message

Luke Barton

Wednesday 30 March 2005 9:42:59 am

I've read a lot about caching on the ez.no site: documentation, articles, references, forum and the book I purchased.

I've enabled everything I know how in the site.ini.append.php file ("cac" is the name of the site):

[ContentSettings]
ViewCaching=enabled
PreViewCache=disabled
PreCacheSiteaccessArray[]=cac
PreCacheSiteaccessArray[]=plain
PreCacheSiteaccessArray[]=admin
TranslationList=

[TemplateSettings]
NodeTreeCaching=disabled
TemplateCache=enabled
TemplateCompile=enabled
TemplateCompression=enabled
ProcessCaching=enabled
Debug=disabled

However, when I incorporate cache blocking for content display templates, the site is very slow -- it takes over 60 seconds to render a page that's only a few kb.

But, if I click on a page that has no template associated with the content class, all page elements render at a decent speed (<7 seconds): page_layout.tpl, page_head.tpl, menu/flat_left.tpl. (Of course, no content renders.)

Basic setup in page_layout.tpl:

{cache-block keys=$uri_string}
...
{include uri="design:page_head.tpl"}
...
{cache-block keys=$module_result.node_id}
{include uri="design:menu/flat_left.tpl"}
{$module_result.content}
{/cache-block}
...
{/cache-block}

The override.ini.append.php file specifies the content display templates for each class of content that the $module_result.content returns. For example:

[cac_content_block]
Source=node/view/full.tpl
MatchFile=cac_content_block_050328.tpl
Subdir=templates
Match[class_identifier]=cac_content_block

The site is very incomplete, but you can see 2 sample pages here: (the first has no content template, the second does):

http://216.218.247.144/index.php/cac_www/about_us

http://216.218.247.144/index.php/cac_www/your_commute

I also ran the file bin/php/eztc.php from secure shell, but I got error messages. I've contacted our host, Firebright, about that and my caching problems.

Thanks in advance for your help.

Luke Barton

Wednesday 30 March 2005 12:51:34 pm

Problem solved: the var->...->cache subdirectory did not have the correct permissions.

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