[wp-trac] [WordPress Trac] #27003: Introduce wp_get_network() and begin cleanup of multisite load

WordPress Trac noreply at wordpress.org
Sun Feb 16 22:53:27 UTC 2014


#27003: Introduce wp_get_network() and begin cleanup of multisite load
--------------------------------------------------+------------------------
 Reporter:  jeremyfelt                            |       Owner:
     Type:  enhancement                           |      Status:  new
 Priority:  normal                                |   Milestone:  3.9
Component:  Bootstrap/Load                        |     Version:  trunk
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:  multisite
--------------------------------------------------+------------------------

Comment (by jeremyfelt):

 I like where [attachment:27003.13.diff] is going. To sum up:

 1. If the network and site is defined, use it.
 1. If additional sites are paths of a primary network domain, lookup the
 network before finding the site.
 1. If additional sites are different domains (or subdomains), lookup the
 site before finding the network. (The site tells us what its parent
 network is)

 So much cleaner.

 `get_site_by_path()` and the changes to `get_network_by_path()` look great
 so far. I'm still parsing in detail. Seems it would be fairly
 straightforward to add caching to each of these based on the requested
 args. The filters are going to go a ways toward reducing the use of
 sunrise entirely for domain lookups.

 I wonder if there's a place for a "every thing you're looking for" cache
 key after step 1 and before steps 2/3 that is able to retrieve site and
 network information based on the requested domain/path or if the
 processing required to extract the requested domain/path makes it not
 worth the effort.

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


More information about the wp-trac mailing list