[wp-trac] [WordPress Trac] #40228: Use get_sites in get_blog_details
WordPress Trac
noreply at wordpress.org
Wed Mar 22 05:35:20 UTC 2017
#40228: Use get_sites in get_blog_details
--------------------------------+-----------------------------
Reporter: spacedmonkey | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 3.0
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
Currently get_blog_details performs raw sql queries to get data out of the
blogs tables. This data is then cached. However how the caching is done in
the function is horrible. It generates three different caches that store
the whole wp_site object in cache.
{{{#!php
wp_cache_delete( $blog_id , 'blog-details' );
wp_cache_delete( $blog_id . 'short' , 'blog-details' );
wp_cache_delete( $domain_path_key, 'blog-lookup' );
}}}
This function should be refactor to use get_sites and relay on the caching
built into wp_site_query
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40228>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list