wp-query-cache
Installation
SKILL.md
WordPress Query Cache
WordPress 6.9 changed how query cache groups store invalidation state. Core now uses stable cache keys with stored salts instead of baking changing last_changed values into every key. This reduces unreachable cache keys on high-update sites.
This skill is for plugin code that directly reads/writes object-cache entries for query results. Most plugins should not do that.
Do not trigger this skill merely because code uses a transient or has a slow
query. Use wp-database-performance-audit for general SQL shape, indexes,
pagination, N+1 calls, payload size, or cache stampedes.
When to use this skill
Trigger when ANY of the following is true:
- Code directly calls
wp_cache_get()/wp_cache_set()in query groups such aspost-queries,term-queries,user-queries,comment-queries,site-queries, ornetwork-queries. - Code builds cache keys with
wp_cache_get_last_changed(). - The task mentions persistent object cache misses, query cache bloat, cache invalidation, or stale query results after updates.
- A plugin duplicates
WP_Query,WP_User_Query,WP_Term_Query, orWP_Comment_Querycache behavior.