[wp-trac] [WordPress Trac] #62692: Performance regression for get_option in 6.4

WordPress Trac noreply at wordpress.org
Wed Jan 15 22:11:31 UTC 2025


#62692: Performance regression for get_option in 6.4
---------------------------------------------+--------------------------
 Reporter:  rmccue                           |       Owner:  joemcgill
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.8
Component:  Options, Meta APIs               |     Version:  6.4
 Severity:  major                            |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  performance
---------------------------------------------+--------------------------
Changes (by peterwilsoncc):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59631" 59631]:
 {{{
 #!CommitTicketReference repository="" revision="59631"
 Options/Meta APIs: Optimize cache hits for non-existent options.

 Optimize the order of checking the various options caches in
 `get_option()` to prevent hitting external caches each time it is called
 for a known non-existent option.

 The caches are checked in the following order when getting an option:

 1. Check the `alloptions` cache first to prioritize existing loaded
 options.
 2. Check the `notoptions` cache before a cache lookup or DB hit.
 3. Check the `options` cache prior to a DB hit.

 Follow up to [56595].

 Props adamsilverstein, flixos90, ivankristianto, joemcgill, rmccue,
 siliconforks, spacedmonkey.
 Fixes #62692.
 See #58277.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62692#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list