cache issue

Author Message

Dan Ruth

Wednesday 12 March 2008 8:23:41 am

I have an event object (container) and within it I have presentation objects. The presentation objects may or may not have related speaker objects.

I have written a piece of logic in my event line template to display an icon based on the following criteria:

1. display a grey icon if the event doesnt have any presentations
2. display a green icon if there are presentation(s) all with related speakers
3. display a red icon if there are any presentation(s) without a related speaker

The logic works, however i am encountering cache issues. For example, if a green icon is displaying in my event listing, and i add to that event a presentation without a related speaker and browse back to the event listing, the icon will not turn red until I clear the content cache. Curiously, if I remove that presentation and browse back to the event listing, the icon will go back to red without clearing the cache.

I have added

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

to the event line template and that has not helped. I have experimented as well with cache-blocks, but cannot seem to find a way to use a cache-block to prevent cacheing of the template code that displays the icon.

Any suggestions or ideas would be much appreciated. Thanks!

André R.

Wednesday 12 March 2008 9:03:20 am

Try scope=global

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

Dan Ruth

Wednesday 12 March 2008 9:28:10 am

Worked like a charm. Thank you for your response, very much appreciated.

Dan

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 16:26:20
Script start
Timing: Jan 18 2025 16:26:20
Module start 'layout'
Timing: Jan 18 2025 16:26:20
Module start 'content'
Timing: Jan 18 2025 16:26:21
Module end 'content'
Timing: Jan 18 2025 16:26:21
Script end

Main resources:

Total runtime0.9050 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.0055 588.9219152.6094
Module start 'layout' 0.00550.0025 741.531339.4141
Module start 'content' 0.00800.8957 780.9453542.0234
Module end 'content' 0.90370.0013 1,322.968812.1953
Script end 0.9050  1,335.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3570160.0002
Check MTime0.00130.1437160.0001
Mysql Total
Database connection0.00090.096310.0009
Mysqli_queries0.856194.5928570.0150
Looping result0.00050.0592550.0000
Template Total0.874196.620.4370
Template load0.00180.201220.0009
Template processing0.872396.380920.4361
Template load and register function0.00020.023410.0002
states
state_id_array0.00120.131210.0012
state_identifier_array0.00170.192920.0009
Override
Cache load0.00140.1585210.0001
Sytem overhead
Fetch class attribute can translate value0.00120.133820.0006
Fetch class attribute name0.00130.148050.0003
XML
Image XML parsing0.00320.351320.0016
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00280.3093230.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
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
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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/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: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs