How to disable caching of left menu?

Author Message

Vytautas Germanavičius

Friday 25 February 2005 11:30:44 am

I have menu

{cache-block keys=$uri_string}
    {menu name=LeftMenu}
{/cache-block}

It shows 3 folders for anonymous users and additional 3 accesible only for registered users.
To test it, I logged in, clicked on first menu item, then i logged out. But after logout i still have 6 menu items in menu.(this is bug)
beeg anonymous i clicked on second menu item, then menu changed and only 3 menu items left (this is ok). I clicked on 3rd menu item - menu has 3 menu items(this is ok). Then i clicked on first menu item - and i got 6 menu items again (this is bug).

It seems, problem is with cashing... Anyone has idea how to solve it?

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

Sascha Frinken

Friday 25 February 2005 2:12:18 pm

In your case you nee to get the user id into the cache key...

{cache-block keys=array($uri_string,$current_user.contentobject_id)}
   {menu name=LeftMenu}
{/cache-block}

hth

Sascha

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.