Ticket #40028: 40028.diff
File 40028.diff, 1.5 KB (added by , 8 years ago) |
---|
-
src/wp-includes/ms-blogs.php
446 446 * @param WP_Site $blog The site object to be cleared from cache. 447 447 */ 448 448 function clean_blog_cache( $blog ) { 449 global $_wp_suspend_cache_invalidation; 450 451 if ( ! empty( $_wp_suspend_cache_invalidation ) ) { 452 return; 453 } 454 449 455 $blog_id = $blog->blog_id; 450 456 $domain_path_key = md5( $blog->domain . $blog->path ); 451 457 452 458 wp_cache_delete( $blog_id, 'sites' ); 453 459 wp_cache_delete( $blog_id, 'site-details' ); 454 wp_cache_delete( $blog_id 460 wp_cache_delete( $blog_id, 'blog-details' ); 455 461 wp_cache_delete( $blog_id . 'short' , 'blog-details' ); 456 wp_cache_delete( $domain_path_key, 'blog-lookup' ); 462 wp_cache_delete( $domain_path_key, 'blog-lookup' ); 463 wp_cache_delete( $domain_path_key, 'blog-id-cache' ); 457 464 wp_cache_delete( 'current_blog_' . $blog->domain, 'site-options' ); 458 465 wp_cache_delete( 'current_blog_' . $blog->domain . $blog->path, 'site-options' ); 459 wp_cache_delete( $domain_path_key, 'blog-id-cache' );460 466 461 467 /** 462 468 * Fires immediately after a site has been removed from the object cache. … … 1133 1139 * @param int|array $ids Network ID or an array of network IDs to remove from cache. 1134 1140 */ 1135 1141 function clean_network_cache( $ids ) { 1142 global $_wp_suspend_cache_invalidation; 1143 1144 if ( ! empty( $_wp_suspend_cache_invalidation ) ) { 1145 return; 1146 } 1147 1136 1148 foreach ( (array) $ids as $id ) { 1137 1149 wp_cache_delete( $id, 'networks' ); 1138 1150