Forums / Developer / How to disable caching of left menu?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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