[wp-trac] [WordPress Trac] #35251: 'networks' should be global cache group

WordPress Trac noreply at wordpress.org
Tue Dec 29 05:41:52 UTC 2015


#35251: 'networks' should be global cache group
--------------------------------+-----------------------------
 Reporter:  johnjamesjacoby     |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  4.4
 Severity:  normal              |   Keywords:  2nd-opinion
  Focuses:  multisite           |
--------------------------------+-----------------------------
 The `networks` cache group is currently being prefixed with a blog ID,
 making it a repeated cache miss and duplicating cached data when using
 multiple networks and querying for them between dashboards.

 The backstory goes that WordPress 4.4 introduced the `WP_Network` class
 (see: #31985) and with it came a simple new method for getting a network,
 aptly titled `get_instance()`. This method is used in `ms-settings.php`
 and `ms-load.php` in place of some previously duplicated and uncached
 code, and is used to retrieve a network's details from the database. That
 query is wrapped in a new cache check with a new `networks` cache group,
 but this group was never added to the global cache groups array.

 It's not a regression, but it could be slipped into 4.4.1 as it was an
 unintentional oversight that could cause cache corruption in multi-network
 setups.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35251>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list