WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 22 months ago

#19008 closed enhancement (fixed)

Introduce a notoptions cache for site options

Reported by: duck_ Owned by: duck_
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Cache API Keywords: has-patch
Focuses: Cc:

Description

Following up on #18955.

Adding a 'notoptions' cache for site options would be consistent with normal options.

Attachments (2)

19008.diff (3.2 KB) - added by wonderboymusic 22 months ago.
19008.2.diff (2.9 KB) - added by duck_ 22 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 @wpmuguru4 years ago

  • Cc wpmuguru added

comment:2 @Otto422 years ago

+1 This should be fixed.

I found almost 30 queries per pageload on a multisite site because it was repeatedly querying for a nonexistent "ms_files_rewriting" site option key. Adding the key fixed the problem, but the notoptions cache should have been there to prevent the multiple queries in the first place.

@wonderboymusic22 months ago

comment:3 follow-up: @wonderboymusic22 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.7

First pass

@duck_22 months ago

comment:4 in reply to: ↑ 3 @duck_22 months ago

Replying to wonderboymusic:

First pass

Uploaded 19008.2.diff to replace get_option() with the accidentally dropped get_site_option() in add_site_option(). Otherwise this looks good to me.

comment:5 @ryan22 months ago

Looks good.

comment:6 @duck_22 months ago

  • Owner set to duck_
  • Resolution set to fixed
  • Status changed from new to closed

In 25043:

Introduce a notoptions cache for site options.

Props wonderboymusic. Fixes #19008.

Note: See TracTickets for help on using tickets.