Further to discussion in #17, can we improve the caching strategy for items?
Currently, Turbo Admin load menu items when on the back-end and cache them for use on the front end. It load-and-caches on every back-end page load. Which is kinda wasteful.
It would be good to be able to detect when menu items have changed and only re-cache at that point?
What causes menu items to change? Here are the things I know about off the top of my head:
Log in
Log out
Activate/deactivate plugin
Switch between editing a post and viewing a post (this doesn't require a full cache invalidation - just remove and add an item in the toolbar/admin bar)
I already detect log in and log out.
Activate/deactivate plugin could be done by inspecting the URL of the page, as this always triggers a page reload.
The special case of edit/view post would have to be considered somehow.
Further to discussion in #17, can we improve the caching strategy for items?
Currently, Turbo Admin load menu items when on the back-end and cache them for use on the front end. It load-and-caches on every back-end page load. Which is kinda wasteful.
It would be good to be able to detect when menu items have changed and only re-cache at that point?
What causes menu items to change? Here are the things I know about off the top of my head:
I already detect log in and log out.
Activate/deactivate plugin could be done by inspecting the URL of the page, as this always triggers a page reload.
The special case of edit/view post would have to be considered somehow.