[wp-trac] [WordPress Trac] #59738: `wp_prime_option_caches()` makes DB queries for known non-existent options (notoptions).

WordPress Trac noreply at wordpress.org
Mon Oct 30 15:53:38 UTC 2023


#59738: `wp_prime_option_caches()` makes DB queries for known non-existent options
(notoptions).
--------------------------------------+--------------------------
 Reporter:  peterwilsoncc             |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  6.4
Component:  Options, Meta APIs        |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by hellofromTonya):

 Replying to [comment:14 peterwilsoncc]:
 > This has become a bit of a general fast-follow ticket rather than
 limited to the initial bug.
 >
 > Since my last update detailing each of the known bugs, there are now
 four:
 >
 > 1. repriming non-existent options triggered a database call
 > 2. repriming falsey options triggered a database call (props Felix)
 > 3. the tests for ensuring priming by group did in fact prime could
 result in a false pass
 > 4. **(new)** the shape of the caches differed when primed via the
 priming function vs get_option() (they are cached in their serialized form
 in get_option()
 >
 >
 > The [https://github.com/WordPress/wordpress-develop/pull/5576 linked
 pull request] handles each of these bugs.
 >
 > Regarding severity: I think the new item (4) bumps the severity up ''a
 little'' as the shape of the cache should be consistent regardless of how
 it is primed. Furthermore, if used in the wild with a persistent cache,
 the difference will stick around for a period of time after the fix.

 6.4 RC3 is delayed 2 days to Nov 1.

 Are there src fixes that should be considered for 6.4.0? For example, item
 4. cc @peterwilsoncc @flixos90

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


More information about the wp-trac mailing list