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

Cached list of pages in settings is not flushed when new pages are added #505

Closed
ericnicolaas opened this issue Jan 11, 2018 · 2 comments

Comments

@ericnicolaas
Copy link
Contributor

commented Jan 11, 2018

The pages are cached like this:

wp_cache_set( 'filtered_static_pages', $pages, 'charitable' );

But we never delete this cache. When new pages are created or pages are deleted, we should delete this cache:

wp_cache_delete( 'filtered_static_pages', 'charitable' );

@ericnicolaas ericnicolaas added this to the 1.5.9 milestone Jan 11, 2018

@ericnicolaas ericnicolaas added the bug label Jan 11, 2018

@ericnicolaas

This comment has been minimized.

Copy link
Contributor Author

commented Jan 11, 2018

There is probably something to be set for ditching the cache here altogether since this really isn't such an expensive operation. We could cache it in the Charitable_Settings class as a property to avoid doing it repeatedly during a single request.

@cliftonc

This comment has been minimized.

Copy link

commented Jan 11, 2018

Thanks @ericnicolaas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.