[wp-trac] [WordPress Trac] #36935: Implement lazy-loading blog details in `WP_Site`
WordPress Trac
noreply at wordpress.org
Wed Jun 29 11:54:48 UTC 2016
#36935: Implement lazy-loading blog details in `WP_Site`
--------------------------------+-------------------------
Reporter: flixos90 | Owner: jeremyfelt
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+-------------------------
Comment (by flixos90):
Replying to [comment:22 jeremyfelt]:
> [attachment:36935.8.diff] loops through the lazy-loaded properties to
check for false values. If any are found, then it skips the caching of
results.
>
> Does that seem reasonable?
Generally I like this approach. Only I'm not sure whether it's more
performant the way you do or alternatively to iterate through `array(
'blogname', 'siteurl', 'post_count', 'home' )` and check whether they
exist in object and are false instead. Whichever way we choose, I think we
should add a `break` statement after setting `$cache_details` to false.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36935#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list