diff --git a/wp-includes/load.php b/wp-includes/load.php index b086ff7d6..c15a9b6b8 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -318,13 +318,15 @@ function wp_set_wpdb_vars() { * @since 3.0.0 */ function wp_start_object_cache() { - global $_wp_using_ext_object_cache; - if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) { - require_once ( WP_CONTENT_DIR . '/object-cache.php' ); - $_wp_using_ext_object_cache = true; - } else { - require_once ( ABSPATH . WPINC . '/cache.php' ); - $_wp_using_ext_object_cache = false; + if ( ! function_exists( 'wp_cache_init' ) ) { + global $_wp_using_ext_object_cache; + if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) { + require_once ( WP_CONTENT_DIR . '/object-cache.php' ); + $_wp_using_ext_object_cache = true; + } else { + require_once ( ABSPATH . WPINC . '/cache.php' ); + $_wp_using_ext_object_cache = false; + } } wp_cache_init(); diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php index e3be06ccd..9a0dc34ed 100644 --- a/wp-includes/ms-settings.php +++ b/wp-includes/ms-settings.php @@ -152,11 +152,8 @@ $PHP_SELF = $_SERVER['PHP_SELF']; if ( empty($PHP_SELF) || ( empty($PHP_SELF) && !is_subdomain_install() && $current_blog->path != '/' ) ) $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); -wp_cache_init(); // need to init cache again after blog_id is set -if ( function_exists('wp_cache_add_global_groups') ) { // need to add these again. Yes, it's an ugly hack - wp_cache_add_global_groups(array ('users', 'userlogins', 'usermeta', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss')); - wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' )); -} +// need to init cache again after blog_id is set +wp_start_object_cache(); ms_default_constants( 'uploads' );