[wp-trac] [WordPress Trac] #37181: Use metadata api in *_network_options

WordPress Trac noreply at wordpress.org
Thu May 26 06:03:04 UTC 2022


#37181: Use metadata api in *_network_options
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:  (none)
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.1
Component:  Networks and Sites                   |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch ms-roadmap dev-feedback    |     Focuses:  multisite,
  has-unit-tests                                 |  performance
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 This may seem tangentially related but I'm going to mention it anyway...

 Something I've noticed with using the `*_network_option()` functions on a
 single site is that they fall back to the `*_option()` function. Which
 makes some sense.

 Where it becomes problematic on a single site install is that there is no
 way to set an option to be autoloaded via these functions. As a result
 anything using this shortcut ends up requiring a database query per option
 (again, on a single site install).

 A good example of this is the salting values when stored in the database
 rather than within wp-config.php: this results in four extra database
 queries on each page load.

 My question is, does making this change lock this problem in as unable to
 be solved?

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


More information about the wp-trac mailing list