Setting in code so page not cached?

Author Message

Bruce Morrison

Thursday 25 November 2004 10:14:41 pm

Hi all

I've created a custom datatype that is used include dynamic content. Because of the dynamic nature of the information when the content object is displayed I don't want the view template cached.

It's possible to add

{set-block scope=root variable=cache_ttl}0{/set-block}

to the overridded node template to achieve this. The issue is that this method requires that this line is added to all node templates that use this datatype.

What I'd like to be able to do is set a value within the datatype code that achieve the same as the setting of the cache_ttl=0 in the template code.

Is this possible?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

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 19 2025 09:04:19
Script start
Timing: Jan 19 2025 09:04:19
Module start 'layout'
Timing: Jan 19 2025 09:04:19
Module start 'content'
Timing: Jan 19 2025 09:04:20
Module end 'content'
Timing: Jan 19 2025 09:04:20
Script end

Main resources:

Total runtime1.2775 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.0055 589.1641152.6250
Module start 'layout' 0.00550.0033 741.789139.4609
Module start 'content' 0.00881.2673 781.2500467.9219
Module end 'content' 1.27610.0014 1,249.17198.3125
Script end 1.2775  1,257.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2765160.0002
Check MTime0.00140.1096160.0001
Mysql Total
Database connection0.00070.056610.0007
Mysqli_queries1.236396.7774460.0269
Looping result0.00050.0368440.0000
Template Total1.242297.220.6211
Template load0.00190.146220.0009
Template processing1.240397.088820.6202
Template load and register function0.00010.007710.0001
states
state_id_array0.00130.105410.0013
state_identifier_array0.00180.138120.0009
Override
Cache load0.00150.1200130.0001
Sytem overhead
Fetch class attribute can translate value0.00100.077110.0010
Fetch class attribute name0.00080.063120.0004
XML
Image XML parsing0.00060.047310.0006
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00090.0668160.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.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/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: 9
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs