Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#14379 closed defect (bug) (fixed)

Add cache invalidation to get_blogs_of_user()

Reported by: ryan Owned by: ryan
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Users Keywords:
Focuses: Cc:


Instead of doing proper cache invalidation, get_blogs_of_user() sets a 5 second timeout on its cache. This results in lots of unnecessary queries. get_blogs_of_user() should set its cache without expiration and do invalidation where needed. Also, it should cache on a list blog ids. There is no need to cache what the get_blog_details() cache is already caching.

Attachments (1)

14379.diff (3.9 KB) - added by ryan 5 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 @ryan5 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Owner set to ryan
  • Status changed from new to assigned

@ryan5 years ago

comment:2 @ryan5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [15833]) Cache invalidation for get_blogs_of_user(). fixes #14379

comment:3 @ryan5 years ago

(In [16225]) Prime blogs of user cache from old cache to avoid mass DB requests on upgrade. see #14379

Note: See TracTickets for help on using tickets.