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

WordPress Trac noreply at wordpress.org
Fri Oct 27 03:24:42 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 peterwilsoncc):

 Replying to [comment:6 hellofromTonya]:
 > What is the result and severity / impact for users for bug(s) identified
 in this ticket (including `'0'`)?

 When priming autoloaded falsey options there will be no impact as these
 are covered by the alloptions cache.

 When priming non-autoloaded falsey options/non existent options the impact
 will be an additional database query each time such an option is attempted
 to be primed. This will occur for users both with and without a persistent
 object cache.

 Ideally an option will only ever be attempted to be primed once per page
 load but for systems with a plugin architecture of their own (WooCommerce,
 various Forms plugins) there may be a higher impact if the plugin's plugin
 attempts to prime such options.

 Overall severity is probably pretty low as the functions are new so
 unlikely to be widely adopted.

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


More information about the wp-trac mailing list