How to disable view caching from fetch function (PHP code)?

Author Message

Andrey Astakhov

Wednesday 27 May 2009 8:36:26 am

I need to do disable view caching for some pages.
I know how to do it in a template, but It is preferably to do it in PHP code of my fetch function. Any idea?

André R.

Wednesday 27 May 2009 9:26:08 am

Should be:

$tpl->setVariable('cache_ttl', 0 )

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

Andrey Astakhov

Monday 01 June 2009 2:46:17 am

Thank you. It works.

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 15:52:34
Script start
Timing: Jan 18 2025 15:52:34
Module start 'layout'
Timing: Jan 18 2025 15:52:34
Module start 'content'
Timing: Jan 18 2025 15:52:35
Module end 'content'
Timing: Jan 18 2025 15:52:35
Script end

Main resources:

Total runtime0.7859 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1719152.6563
Module start 'layout' 0.00530.0026 740.828139.5078
Module start 'content' 0.00800.7764 780.3359531.5469
Module end 'content' 0.78430.0016 1,311.88288.0938
Script end 0.7859  1,319.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3979160.0002
Check MTime0.00130.1662160.0001
Mysql Total
Database connection0.00100.124810.0010
Mysqli_queries0.745494.8385570.0131
Looping result0.00050.0636550.0000
Template Total0.752895.820.3764
Template load0.00200.250520.0010
Template processing0.750895.528620.3754
Template load and register function0.00020.022010.0002
states
state_id_array0.00190.245210.0019
state_identifier_array0.00140.177720.0007
Override
Cache load0.00160.2011110.0001
Sytem overhead
Fetch class attribute can translate value0.00070.084920.0003
Fetch class attribute name0.00140.176140.0003
XML
Image XML parsing0.00070.083420.0003
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00080.1040170.0000
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
3content/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: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs