Opened 12 years ago
Closed 11 years ago
#23173 closed task (blessed) (fixed)
Don't cache arrays of query results in a single cache bucket
Reported by: | ryan | Owned by: | |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Cache API | Keywords: | |
Focuses: | Cc: |
Description
We have started using one cache bucket per query with passive invalidation controlled through a last_changed incrementor. See #22024 for an example. We also need to do this with get_pages(), wp_get_archives(), and elsewhere. On wordpress.com we have hacked some of these into separate buckets because saving multiple queries per cache bucket results in huge buckets. We have seen 72MB get_pages caches. Let's finally clean this up for good. Some of the last_changed work done for #22176 can be used here.
Change History (17)
#8
@
12 years ago
Looking at [23300], are we going to do function_exists( 'wp_cache_incr' )
everywhere or can we mandate that all the object cache backends implement it?
#9
@
12 years ago
Maybe wrap that logic in wp_bump_last_changed( 'post' )? Although if plugins like W3 Total Cache updated for 3.4 we might be able to drop the checks.
#12
@
12 years ago
get_calendar() also looks like a good one to update. It can invalidate with the posts last_changed.
If we introduce wp_cache_get_multi(), perhaps we should consider finally splitting alloptions and notoptions into individual cache buckets.
See #23167 for get_pages(). This ticket can be a tracking ticket for all such changes.