Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#23173 closed task (blessed) (fixed)

Don't cache arrays of query results in a single cache bucket

Reported by: ryan Owned by:
Priority: normal Milestone: 3.6
Component: Cache API Version: 3.5
Severity: normal Keywords:
Cc: Focuses:

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)

#1 @ryan
14 years ago

See #23167 for get_pages(). This ticket can be a tracking ticket for all such changes.

#2 @aaroncampbell
14 years ago

  • Cc aaroncampbell added

#3 @ryan
14 years ago

  • Milestone Future Release3.6

#4 @ryan
14 years ago

  • Type defect (bug)task (blessed)

#5 @adamsilverstein
14 years ago

  • Cc ADAMSILVERSTEIN@… added

#6 @ryan
14 years ago

#23206 for wp_get_archives()

#7 @scribu
14 years ago

  • Cc scribu added

#8 @scribu
14 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?

Last edited 14 years ago by scribu (previous) (diff)

#9 @ryan
14 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.

#10 @ryan
14 years ago

#23326 for get_terms()

#11 @ryan
14 years ago

#23327 for get_bookmarks()

#12 @ryan
14 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.

#13 @ryan
14 years ago

In 23384:

Use incrementors for cache invalidation in get_terms().

fixes #23326
see #23173

#14 @ryan
14 years ago

In 23385:

In wp_get_archives(), cache queries to individual cache buckets instead of storing them in one cached array. Use incrementor style passive cache invalidation.

fixes #23206
see #23173

#15 @ryan
13 years ago

  • Milestone 3.6Future Release

#16 @wonderboymusic
13 years ago

  • Milestone Future Release3.7

Looks like a lot of this made it in, moving to 3.7 for conf from Ryan

#17 @nacin
13 years ago

  • Milestone 3.73.6
  • Resolutionfixed
  • Status newclosed

Setting this as fixed for 3.6. Any further conversions can happen in new tickets.

Note: See TracTickets for help on using tickets.