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