Forums / Setup & design / cache issue

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

eZ debug

Timing: Jan 18 2025 10:54:49
Script start
Timing: Jan 18 2025 10:54:49
Module start 'content'
Timing: Jan 18 2025 10:54:50
Module end 'content'
Timing: Jan 18 2025 10:54:50
Script end

Main resources:

Total runtime0.9513 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 588.7031180.8516
Module start 'content' 0.00790.7830 769.5547547.0859
Module end 'content' 0.79090.1603 1,316.6406332.7656
Script end 0.9512  1,649.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.4708210.0002
Check MTime0.00170.1791210.0001
Mysql Total
Database connection0.00100.100810.0010
Mysqli_queries0.857190.10231940.0044
Looping result0.00210.22261920.0000
Template Total0.901394.720.4506
Template load0.00320.338520.0016
Template processing0.898094.398720.4490
Template load and register function0.00020.022110.0002
states
state_id_array0.00500.526910.0050
state_identifier_array0.00140.143120.0007
Override
Cache load0.00270.2852210.0001
Sytem overhead
Fetch class attribute can translate value0.00170.182030.0006
Fetch class attribute name0.00100.102050.0002
XML
Image XML parsing0.00410.433330.0014
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.01451.5229340.0004
String conversion0.00000.001030.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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