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

Consider purging everything when a nav menu is updated #115

Closed
danielbachhuber opened this issue Nov 15, 2017 · 4 comments
Closed

Consider purging everything when a nav menu is updated #115

danielbachhuber opened this issue Nov 15, 2017 · 4 comments

Comments

@danielbachhuber
Copy link
Contributor

From #112

Changes @ /wp-admin/nav-menus.php trigger for every term purge_term and action_clean_term_cache and for every item action_clean_post_cache and purge_post_with_related.

There is not a lot we can do about it in the current setup, but we can at least make sure that it clears the whole cache as this most likely impacts the whole site.

@rubas
Copy link
Contributor

rubas commented Nov 15, 2017

Do you have a better idea?

At the moment is clearing a lot of keys for nothing.

@joshkoenig
Copy link
Member

I don't like auto-purging the whole cache.

However, we could pop an admin notice informing the user that the action they just took changes content on a lot of pages and if they want it to be immediately visible, they should purge the whole cache. E.g. make it something for the individual site admin to decide on.

@danielbachhuber
Copy link
Contributor Author

Nav menus are being rebuilt as Gutenberg blocks in WordPress core, so this isn't an optimization worth solving for at this point.

@tedw
Copy link

tedw commented Sep 5, 2024

Nav menus are being rebuilt as Gutenberg blocks in WordPress core, so this isn't an optimization worth solving for at this point.

FWIW not all themes are using the new navigation block. Most of my clients have custom themes built with Sage and use Navi (https://github.com/Log1x/navi) to generate the markup.

Considering nav updates are relatively infrequent on most sites, I think clearing the whole cache would be preferable to requiring site owners to log into Pantheon to manually clear the cache in order to see the update right away.

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

4 participants