cache block question

Author Message

A Costello

Wednesday 25 February 2009 11:35:16 am

Here is my situation:
I have a section in my layout that performs a fetch and outputs the content. I would like this section cached until the fetch node being fetched changes. How would I structure that cache-block?

Gaetano Giunta

Wednesday 25 February 2009 3:10:31 pm

See here for more details: http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/miscellaneous/cache_block

A comment on that doc page states that using node id is fine, eg.

{cache-block subtree_expiry=$mynodeID}
    {def $node = fectch(...)}
{/cache-block}

Otherwise you need to know the url alias to yout node and use that instead

Principal Consultant International Business
Member of the Community Project Board

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:34:41
Script start
Timing: Jan 18 2025 11:34:41
Module start 'layout'
Timing: Jan 18 2025 11:34:41
Module start 'content'
Timing: Jan 18 2025 11:34:42
Module end 'content'
Timing: Jan 18 2025 11:34:42
Script end

Main resources:

Total runtime1.5571 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.8125152.6094
Module start 'layout' 0.00530.0031 740.421939.4141
Module start 'content' 0.00841.5473 779.8359521.8672
Module end 'content' 1.55570.0014 1,301.70318.1875
Script end 1.5571  1,309.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2073160.0002
Check MTime0.00130.0847160.0001
Mysql Total
Database connection0.00080.052910.0008
Mysqli_queries1.512097.0985540.0280
Looping result0.00050.0349520.0000
Template Total1.518097.520.7590
Template load0.00200.130420.0010
Template processing1.516097.354920.7580
Template load and register function0.00020.015410.0002
states
state_id_array0.00150.098110.0015
state_identifier_array0.00150.098320.0008
Override
Cache load0.00160.1032110.0001
Sytem overhead
Fetch class attribute can translate value0.00080.054520.0004
Fetch class attribute name0.00150.098630.0005
XML
Image XML parsing0.00070.042120.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00080.0515160.0001
String conversion0.00000.000740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs