cache block not honored in frontpage.tpl [SOLVED]

Author Message

Douglas Hammond

Wednesday 19 August 2009 3:17:43 pm

I have ezweb installed and and override for my main frontpage.

In that override template I have

{cache-block keys=array( $module_result.uri, $current_user.contentobject_id )}

{def $bookinginfo = fetch(cbb,listbookings)
$departureinfo = fetch(cbb,listdepartures)}

{/cache-block}

No matter what user I am this block is always the same.

i looked at paglayout.tpl and it does not look like the maincontnet is cached so I cannot see why this would be ignored.

Any ideas?

[SOLUTION]

frontpage.tpl is a view template not a layout.
so it it the view cache that handles it and not the templat cache.

André R.

Thursday 20 August 2009 2:16:45 am

Correct!
If your on 4.1 and higher and need to make view cache work pr user on a certain node (much more efficient then disabling it and using cache-blocks), then have a look at site.ini[ContentSettings]ViewCacheTweaks[] ;)

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

Douglas Hammond

Thursday 20 August 2009 7:33:36 am

That is exactly what I am looking for.

I am glad to see this addition.

Douglas Hammond

Thursday 20 August 2009 7:43:58 am

OK with this new viewcachetweaks and 4.1.3 I thought I would give it a try.

I removed my cache code from the template

Added

[ContentSettings]
ViewCacheTweaks[2]=pr_user

And it does not seem to work.

Am I missing another setting to turn this on?

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