[wp-trac] [WordPress Trac] #43506: Ensure a network's `notoptions` cache is an array to reduce lookup overhead

WordPress Trac noreply at wordpress.org
Fri Mar 9 19:49:05 UTC 2018


#43506: Ensure a network's `notoptions` cache is an array to reduce lookup overhead
--------------------------------------+------------------------
 Reporter:  flixos90                  |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.0
Component:  Options, Meta APIs        |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  multisite
--------------------------------------+------------------------
Changes (by flixos90):

 * keywords:  needs-patch needs-unit-tests => has-patch has-unit-tests
 * owner:   => flixos90
 * status:  new => assigned
 * milestone:  Awaiting Review => 5.0


Comment:

 [attachment:43506.diff] fixes this by always setting the
 `{$network_id}:notoptions` cache key in `get_network_option()` in case it
 is not an array. This ensures that on subsequent requests the value is
 stored in the (local) cache.

 Two tests have been added to verify the correct behavior.

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


More information about the wp-trac mailing list