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.

eZ debug

Timing: Jan 18 2025 11:30:52
Script start
Timing: Jan 18 2025 11:30:52
Module start 'layout'
Timing: Jan 18 2025 11:30:52
Module start 'content'
Timing: Jan 18 2025 11:30:53
Module end 'content'
Timing: Jan 18 2025 11:30:53
Script end

Main resources:

Total runtime0.8995 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.0469152.6406
Module start 'layout' 0.00750.0030 740.687539.4922
Module start 'content' 0.01060.8875 780.1797545.7813
Module end 'content' 0.89810.0014 1,325.960912.1250
Script end 0.8994  1,338.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3556160.0002
Check MTime0.00130.1452160.0001
Mysql Total
Database connection0.00150.168910.0015
Mysqli_queries0.844993.9315600.0141
Looping result0.00060.0703580.0000
Template Total0.861195.720.4306
Template load0.00190.211120.0009
Template processing0.859295.525620.4296
Template load and register function0.00020.022910.0002
states
state_id_array0.00170.194410.0017
state_identifier_array0.00150.170420.0008
Override
Cache load0.00160.1750300.0001
Sytem overhead
Fetch class attribute can translate value0.00130.141420.0006
Fetch class attribute name0.00170.192950.0003
XML
Image XML parsing0.00070.078120.0004
class_abstraction
Instantiating content class attribute0.00000.001150.0000
General
dbfile0.00100.1086170.0001
String conversion0.00000.001040.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
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/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: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs