[wp-trac] [WordPress Trac] #40669: Proper query cache invalidation on queries meta queries
WordPress Trac
noreply at wordpress.org
Thu May 4 19:21:16 UTC 2017
#40669: Proper query cache invalidation on queries meta queries
--------------------------------+-----------------------------
Reporter: spacedmonkey | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Keywords:
Focuses: performance |
--------------------------------+-----------------------------
Currently, terms and comments have query caching and meta query support.
Queries are cached using the use the last_changed in the object cache
group. Query caches are invalidated (busted) when the last_changed value
is changed, when a term / comment is changed / created. However, when meta
on these objects are changed / deleted, query are not invalidated.
Example.
- Run a comment query with a meta query foo=bar. Get 4 results.
- add_comment_meta to a new comment.
- Run a comment query with a meta query foo=bar. It will return cached
result of 4, even through the result should be 5.
This is an issue, if plugin developers, use the meta functions to add meta
to an object, queries should still invalidate.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40669>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list