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

WordPress Trac noreply at wordpress.org
Tue Aug 29 11:30:53 UTC 2017


#37181: Use metadata api in *_network_options
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
Component:  Options, Meta APIs                   |  Release
 Severity:  normal                               |     Version:  4.4
 Keywords:  has-patch ms-roadmap dev-feedback    |  Resolution:
  has-unit-tests                                 |     Focuses:  multisite
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 [https://core.trac.wordpress.org/attachment/ticket/37181/37181.6.diff
 37181.6.diff]

 Fixes some styling issues with the comments and the code. It now is WP
 code standards. Also there has been changed to variables since original
 patch.

 One thing to note about this change how the meta api handles caching. The
 meta api loads all the meta for an object into one cache key. This means,
 when you request one option, it then loads all options in memory / object
 cache. Personally, I think this is a good thing, you are effectively
 autoloading all options, similar to how options works in core. But it may
 have effects on performance in different use cases. In WP_Network_Query,
 the network option (Meta) cache is primed. It is reasonable to guess, that
 if you are query networks that you will likely want the meta as well. As
 Network query is used in the bootstrap, the network option will be cache
 will be primed much easier.

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


More information about the wp-trac mailing list