Hello
I searched a bit here and didnt find anything for what i need…
I generate a css html menu from php every time a page is requested.However this menu is large… and when on remote server i can see each menu item drawing on the screen(every item is 3 level deep)…
So iam looking for an efficient way to cache the menu and dont have to generate it everytime..
I think generating a html page for the menu might be a solution but the problem is to know when it is updated and needs regeneration..
Hello I searched a bit here and didnt find anything for what i need…
Share
The usual point at which to trigger regeneration is (well, obviously) when the menu’s data structure is changed.
It’s impossible to give detailed advice without knowing what your application looks like, but you could, for example, add a mechanism to your back-end that deletes the cached version every time the user adds, removes or changes a menu item. The next time the page is opened, the cache gets re-built.
Alternatively, force a re-build of the cache directly in the menu interface… Whatever works best for what you’re using.