-
Notifications
You must be signed in to change notification settings - Fork 882
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
Cache indexables when they are retrieved #19555
Comments
13 tasks
This was referenced Apr 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://yoast.atlassian.net/browse/DUPP-627
Whenever a page is visited on the frontend, we query the database for its accompanying indexable. We do not cache this indexable, leading to repeating database queries when revisiting or reloading the page (even though the indexable tied to that page would most likely not have changed in the mean time).
We do cache the indexable within a page load (within the Meta_Tags_Context_Memoizer), to reduce the amount of database queries within a page load. However, we do not have any caching behavior between page loads.
Accompanying issue on GitHub: Uncached SQL queries on every page load. WAIT FOR FEEDBACK
Possible approach
We could add caching behavior between page loads within the Meta_Tags_Context_Memoizer, or possibly within the Indexable_Repository, most likely using the WordPress caching functions.
Whenever an indexable is rebuilt, we can invalidate the cached value for that indexable again. This could be done in the Indexable_Builder class, since it is the main entry point for (re)building indexables.
Notes
Is duplicated by: https://yoast.atlassian.net/browse/DUPP-633
Ari started work on this: wordpress-seo: Add caching to queriesOPEN
The text was updated successfully, but these errors were encountered: