Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve menu item caching strategy #18

Open
rosswintle opened this issue Nov 3, 2021 · 0 comments
Open

Improve menu item caching strategy #18

rosswintle opened this issue Nov 3, 2021 · 0 comments

Comments

@rosswintle
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant