Trouble with cache-block expiry

Author Message

Bjørn Kaarstein

Monday 26 April 2004 12:38:12 am

Hi.

I've got this code running in order to display a random profile.

{cache-block expiry=60}

{let randomised_array=fetch('content','tree', hash('parent_node_id', '77',
						class_filter_type, "include", class_filter_array, array(17)))|shuffle}

{section name=random loop=$randomised_array max=1}

{node_view_gui view=element content_node=$random:item} </br>

{/section}
{/let}
{/cache-block}

With the expiry set to 60, it takes 60 seconds before the profile changes on a refresh.
My problem is when I raise the expiry to i.e. 86400, because I want this profile to change once a day. When using this expiry, the cache block doesn't work at all. A new random profile i s loaded on every reload.

This code is situated in my pagelayout.tpl.

Any ideas?

Regards Bjørn

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 31 2025 09:27:35
Script start
Timing: Jan 31 2025 09:27:35
Module start 'layout'
Timing: Jan 31 2025 09:27:35
Module start 'content'
Timing: Jan 31 2025 09:27:36
Module end 'content'
Timing: Jan 31 2025 09:27:36
Script end

Main resources:

Total runtime1.1935 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0109 588.1406151.2109
Module start 'layout' 0.01090.0034 739.351636.6641
Module start 'content' 0.01431.1784 776.0156824.6406
Module end 'content' 1.19270.0008 1,600.65637.8516
Script end 1.1935  1,608.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2623160.0002
Check MTime0.00130.1092160.0001
Mysql Total
Database connection0.00130.109510.0013
Mysqli_queries1.148196.1925460.0250
Looping result0.00030.0281440.0000
Template Total1.143495.820.5717
Template load0.00190.159920.0010
Template processing1.141595.636620.5707
Template load and register function0.00140.117610.0014
states
state_id_array0.00180.149910.0018
state_identifier_array0.00160.130920.0008
Override
Cache load0.00150.1222110.0001
Sytem overhead
Fetch class attribute can translate value0.00080.071010.0008
Fetch class attribute name0.00150.128810.0015
XML
Image XML parsing0.00030.024610.0003
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00210.1784100.0002
String conversion0.00000.000840.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs