[wp-trac] [WordPress Trac] #36935: Implement lazy-loading blog details in `WP_Site`
WordPress Trac
noreply at wordpress.org
Wed Jun 29 19:31:50 UTC 2016
#36935: Implement lazy-loading blog details in `WP_Site`
---------------------------------------------+-------------------------
Reporter: flixos90 | Owner: jeremyfelt
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit needs-dev-note | Focuses: multisite
---------------------------------------------+-------------------------
Changes (by jeremyfelt):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"37918"]:
{{{
#!CommitTicketReference repository="" revision="37918"
Multisite: Lazy load extended `WP_Site` properties when requested.
In the past, `get_blog_details()` has been used to retrieve the `home`,
`siteurl`, `blogname`, and `post_count` options for a site. By lazy
loading properties in a `WP_Site` object, we can avoid having to use
`get_blog_details()` and instead provide the properties as needed.
This introduces the global `site-details` cache group in which standard
objects representing the site are stored. This will one day be a
replacement for the `blog-details` cache group that is currently used in
`get_blog_details()`.
This relies on the `ms_loaded` action introduced in [37916] as properties
are not available via `get_option()` until multisite has been fully
loaded.
Props flixos90.
Fixes #36935.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36935#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list