Changeset 1387

Show
Ignore:
Timestamp:
07/21/08 10:59:29 (5 months ago)
Author:
donncha
Message:

Backup the object cache when switching and restore it afterwards.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/wpmu-functions.php

    r1385 r1387  
    361361                return; 
    362362 
     363        $wp_object_cache->switched_cache[ $blog_id ] = $wp_object_cache->cache; 
     364        unset( $wp_object_cache->cache ); 
     365 
    363366        $wpdb->set_blog_id($new_blog); 
    364367        $table_prefix = $wpdb->prefix; 
     
    388391        if ( $blog_id == $blog ) 
    389392                return; 
     393 
     394        $wp_object_cache->cache = $wp_object_cache->switched_cache[ $blog ]; 
     395        unset( $wp_object_cache->switched_cache[ $blog ] ); 
    390396 
    391397        $wpdb->set_blog_id($blog);