Forums / General / How to disable cache for a specific template

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

eZ debug

Timing: Jan 18 2025 02:53:08
Script start
Timing: Jan 18 2025 02:53:08
Module start 'content'
Timing: Jan 18 2025 02:53:09
Module end 'content'
Timing: Jan 18 2025 02:53:09
Script end

Main resources:

Total runtime1.0268 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.9531180.8281
Module start 'content' 0.00540.8234 769.7813657.6953
Module end 'content' 0.82880.1979 1,427.4766337.0625
Script end 1.0267  1,764.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3835210.0002
Check MTime0.00150.1505210.0001
Mysql Total
Database connection0.00060.054710.0006
Mysqli_queries0.929390.50162050.0045
Looping result0.00240.23342030.0000
Template Total1.001697.520.5008
Template load0.00200.192420.0010
Template processing0.999697.354120.4998
Template load and register function0.00020.019610.0002
states
state_id_array0.00120.118910.0012
state_identifier_array0.00090.089220.0005
Override
Cache load0.00180.1743450.0000
Sytem overhead
Fetch class attribute can translate value0.00140.138050.0003
Fetch class attribute name0.00230.219590.0003
XML
Image XML parsing0.00860.835250.0017
class_abstraction
Instantiating content class attribute0.00000.0016100.0000
General
dbfile0.01341.3034460.0003
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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