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 !!

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 15:51:26
Script start
Timing: Jan 18 2025 15:51:26
Module start 'layout'
Timing: Jan 18 2025 15:51:26
Module start 'content'
Timing: Jan 18 2025 15:51:27
Module end 'content'
Timing: Jan 18 2025 15:51:27
Script end

Main resources:

Total runtime0.8373 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.0068 589.0313152.6250
Module start 'layout' 0.00680.0028 741.656339.4453
Module start 'content' 0.00960.8263 781.1016538.0391
Module end 'content' 0.83590.0013 1,319.140612.1641
Script end 0.8372  1,331.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3827160.0002
Check MTime0.00130.1582160.0001
Mysql Total
Database connection0.00070.086110.0007
Mysqli_queries0.782593.4627570.0137
Looping result0.00070.0814550.0000
Template Total0.807296.420.4036
Template load0.00220.262320.0011
Template processing0.805096.148420.4025
Template load and register function0.00010.010610.0001
states
state_id_array0.00070.083010.0007
state_identifier_array0.00100.123320.0005
Override
Cache load0.00190.2213250.0001
Sytem overhead
Fetch class attribute can translate value0.00060.066920.0003
Fetch class attribute name0.00180.211850.0004
XML
Image XML parsing0.00160.186020.0008
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00150.1765220.0001
String conversion0.00000.000940.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
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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs