Preventing caching of some template

Author Message

Eirik Alfstad Johansen

Friday 10 October 2003 2:55:27 am

Hi,

I have an if-else section as part of my pagelayout template. The section is fetched from the header of the admin template, and produces a log in/log out message depending on whether the user is logged in or not.

The problem is, however, that because the section is part of a template, the section result is cached along with the template. How can I prevent this?

I'm guessing that the solution lies somewhere in putting the section in a separate template and turning of caching for that template, but how do I control caching at a seperate templates level? Is it even possible?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Marco Zinn

Tuesday 14 October 2003 8:02:02 am

For turning of caching in a given template, see here:
http://www.ez.no/developer/ez_publish_3/documentation/incoming/how_to_set_cache_expire_time_or_disable_cache_in_template

But I think, your problem is easier: Close the cache-block, that probably starts your pagelayout.tpl, before your if-else-section starts.
See here: http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/functions/function_list

As the admin siteaccess is known to work well ;), you can examine the admin's pagelayout and look out for "cache-block" diretives there.

Marco
http://www.hyperroad-design.com

Eirik Alfstad Johansen

Sunday 19 October 2003 7:09:29 am

Thanks for the tip, Marco!

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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 22:11:32
Script start
Timing: Jan 18 2025 22:11:32
Module start 'layout'
Timing: Jan 18 2025 22:11:32
Module start 'content'
Timing: Jan 18 2025 22:11:33
Module end 'content'
Timing: Jan 18 2025 22:11:33
Script end

Main resources:

Total runtime0.6060 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.0043 589.0547152.6250
Module start 'layout' 0.00430.0027 741.679739.4453
Module start 'content' 0.00700.5975 781.1250540.0781
Module end 'content' 0.60460.0014 1,321.203112.1563
Script end 0.6060  1,333.3594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5403160.0002
Check MTime0.00130.2091160.0001
Mysql Total
Database connection0.00070.112210.0007
Mysqli_queries0.560792.5165570.0098
Looping result0.00050.0884550.0000
Template Total0.578595.520.2893
Template load0.00230.375120.0011
Template processing0.576395.088620.2881
Template load and register function0.00010.017510.0001
states
state_id_array0.00080.139110.0008
state_identifier_array0.00060.102520.0003
Override
Cache load0.00190.3122180.0001
Sytem overhead
Fetch class attribute can translate value0.00080.130720.0004
Fetch class attribute name0.00100.164250.0002
XML
Image XML parsing0.00080.139120.0004
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00070.1145220.0000
String conversion0.00000.001140.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs