How to disable cache for a specific template

Author Message

John Mangadan

Monday 29 November 2010 6:24:03 am

Hi,

I am experiencing problem with a particular template being cached. The template actually exists inside an extension.In siste.ini we enabled the template caching. Is there any way to disable caching for this particular template?

Thanks,

John

Heath

Monday 29 November 2010 11:05:37 pm

Hello John,

Try adding this to templates you wish to remain uncached.

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

I hope this helps.

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

John Mangadan

Tuesday 30 November 2010 1:43:04 am

"

Hello John,

Try adding this to templates you wish to remain uncached.

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

I hope this helps.

Cheers,

Heath

"

I added this , but there is no change. It is still caching the template. Any idea?

Andy Caiger

Friday 10 December 2010 3:09:29 am

We have had the same problem since upgrading from eZ Publish 4.2 to 4.3. The above line was always there in the template, and it used to work before the upgrade.

Help!

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

Sujit Sth

Tuesday 04 January 2011 9:09:25 pm

Disable cache

Follow the following instruction.

1. Go to your template file:
eg:
E:\xampp\htdocs\ezpublish\settings\siteaccess\your_site\site.ini.append.php

2. Place the following code:

[DebugSettings] DebugOutput=enabled DebugRedirection=disabled DebugToolbar=disabled DebugByIP=disabled DebugByUser=disabled  [TemplateSettings] TemplateCompile=disabled TemplateCache=disabled DevelopmentMode=disabled ShowUsedTemplates=enabled Debug=disabled ShowXHTMLCode=disabled  [ContentSettings] ViewCaching=disabled  [DatabaseSettings] SQLOutput=disabled 

Go and enjoy the code !!!!!!

For detail follow the link below:

http://blog.developeronhire.com/tag/disble-cache/

Regards,

Sujeet

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 05:13:55
Script start
Timing: Jan 18 2025 05:13:55
Module start 'layout'
Timing: Jan 18 2025 05:13:55
Module start 'content'
Timing: Jan 18 2025 05:13:55
Module end 'content'
Timing: Jan 18 2025 05:13:55
Script end

Main resources:

Total runtime0.6440 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.4766152.6406
Module start 'layout' 0.00650.0029 742.117239.4844
Module start 'content' 0.00940.6332 781.6016652.6016
Module end 'content' 0.64260.0014 1,434.203116.1250
Script end 0.6440  1,450.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4981160.0002
Check MTime0.00130.2015160.0001
Mysql Total
Database connection0.00110.174110.0011
Mysqli_queries0.570888.6261680.0084
Looping result0.00070.1089660.0000
Template Total0.614895.520.3074
Template load0.00230.354620.0011
Template processing0.612595.109520.3063
Template load and register function0.00010.019510.0001
states
state_id_array0.00080.117710.0008
state_identifier_array0.00070.104220.0003
Override
Cache load0.00190.2962450.0000
Sytem overhead
Fetch class attribute can translate value0.00080.130140.0002
Fetch class attribute name0.00110.174790.0001
XML
Image XML parsing0.00300.471840.0008
class_abstraction
Instantiating content class attribute0.00000.0026100.0000
General
dbfile0.00220.3372350.0001
String conversion0.00000.001440.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 9

Time used to render debug report: 0.0002 secs