Hi all,
 
I use a HTML menu that is created from multiple database queries. This is powerfull 
and very extendable.
The problem is that the queries have to be executed on every new page or request.
Moreover, the menu won't change very often for the users.
 
So I would like to 'cache' the HTML code that is generated.  If one admin 
add/remove/update one menu, I need to clear the cache.
 
At the moment, I store the HTML code to display the menu in the 
$_SESSION['menu_cache']['menu_id'] var. And this works well! The pages are displayed 
faster when the menu is in the cache, which is the expected result!
 
What is your opinion about this?
Do you see any other way to 'cache' some content?
 
Could I use the $_ENV variable (or any other) to cache the menus accross ALL 
visitors/users?
 
Thank you
 
Vincent

Reply via email to