Forums / Setup & design / basic problem with cache !

basic problem with cache !

Author Message

Eder Silva

Wednesday 14 February 2007 11:29:04 am

Hello my friends !!

This is the problem:

I have a lot of folder's created and I create a police for my users...when the user "Eric" login your name show on top page (ex. logout (Eric)), ok !

But, if Eric logout, and user "John" login, the name Eric continue show in top of page....

I know its a cache, but only in some folder's the name Eric persist, in other folders the name "John" showed ok.....

Help-me please....

Thks...

Xavier Serna

Thursday 15 February 2007 12:39:22 am

Hi Eder,

you have to include the output with the current user inside a cache-block unique for each user, at this page you can see an example of how to do it:

http://ez.no/community/articles/ez_publish_performance_optimization_part_3_of_3_practical_cache_and_template_solutions/cache_blocks_optimization

the part that refers to your question:

Here is an example with cache-blocks that are unique for each URL and user:

{cache-block keys=array($uri_string,$current_user.contentobject_id)}
... tpl code
{/cache-block}

hope this helps!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Eder Silva

Thursday 15 February 2007 10:35:26 am

Ok, this is the solution, but.....

I think it isn't a better solution...the eZ cache is power, but in this case confused my project..

Thanks for your answer my friend !!

eZ debug

Timing: Jan 18 2025 11:28:37
Script start
Timing: Jan 18 2025 11:28:37
Module start 'content'
Timing: Jan 18 2025 11:28:38
Module end 'content'
Timing: Jan 18 2025 11:28:38
Script end

Main resources:

Total runtime1.0258 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.0060 587.7109180.8359
Module start 'content' 0.00600.7990 768.5469543.1172
Module end 'content' 0.80500.2208 1,311.6641332.7500
Script end 1.0257  1,644.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3662210.0002
Check MTime0.00140.1341210.0001
Mysql Total
Database connection0.00060.063210.0006
Mysqli_queries0.948092.41381940.0049
Looping result0.00240.22981920.0000
Template Total0.995597.020.4978
Template load0.00190.189320.0010
Template processing0.993696.858620.4968
Template load and register function0.00010.013510.0001
states
state_id_array0.00120.115910.0012
state_identifier_array0.00120.113420.0006
Override
Cache load0.00160.1579250.0001
Sytem overhead
Fetch class attribute can translate value0.00140.131630.0005
Fetch class attribute name0.00140.136150.0003
XML
Image XML parsing0.00140.138330.0005
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00270.2643330.0001
String conversion0.00000.000730.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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs