Changeset 22092 for trunk/wp-includes/ms-blogs.php
- Timestamp:
- 10/01/2012 06:03:23 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/ms-blogs.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-blogs.php
r22087 r22092 254 254 $details = get_blog_details( $blog_id, false ); 255 255 256 wp_cache_delete( $blog_id , 'blog-details' ); 257 wp_cache_delete( $blog_id . 'short' , 'blog-details' ); 258 wp_cache_delete( md5( $details->domain . $details->path ) , 'blog-lookup' ); 259 wp_cache_delete( 'current_blog_' . $details->domain, 'site-options' ); 260 wp_cache_delete( 'current_blog_' . $details->domain . $details->path, 'site-options' ); 261 wp_cache_delete( 'get_id_from_blogname_' . trim( $details->path, '/' ), 'blog-details' ); 256 clean_blog_cache( $details ); 262 257 263 258 do_action( 'refresh_blog_details', $blog_id ); … … 315 310 316 311 return true; 312 } 313 314 /** 315 * Clean the blog cache 316 * 317 * @since 3.5.0 318 * 319 * @param stdClass $blog The blog details as returned from get_blog_details() 320 */ 321 function clean_blog_cache( $blog ) { 322 $blog_id = $blog->blog_id; 323 $domain_path_key = md5( $blog->domain . $blog->path ); 324 325 wp_cache_delete( $blog_id , 'blog-details' ); 326 wp_cache_delete( $blog_id . 'short' , 'blog-details' ); 327 wp_cache_delete( $domain_path_key, 'blog-lookup' ); 328 wp_cache_delete( 'current_blog_' . $blog->domain, 'site-options' ); 329 wp_cache_delete( 'current_blog_' . $blog->domain . $blog->path, 'site-options' ); 330 wp_cache_delete( 'get_id_from_blogname_' . trim( $blog->path, '/' ), 'blog-details' ); 331 wp_cache_delete( $domain_path_key, 'blog-id-cache' ); 317 332 } 318 333 … … 493 508 wp_cache_add_global_groups( $global_groups ); 494 509 else 495 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts' ) );510 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', ' blog-id-cache' ) ); 496 511 wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); 497 512 } … … 554 569 wp_cache_add_global_groups( $global_groups ); 555 570 else 556 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts' ) );571 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', ' blog-id-cache' ) ); 557 572 wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); 558 573 }
Note: See TracChangeset
for help on using the changeset viewer.