From 116d1d354e987e5fe633afd1852bc33cfb718c07 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 6 Feb 2015 03:24:23 +0000 Subject: [PATCH] Add useremail and userslugs as global cache groups. fixes #31243. Built from https://develop.svn.wordpress.org/trunk@31347 git-svn-id: http://core.svn.wordpress.org/trunk@31328 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/load.php | 2 +- wp-includes/ms-blogs.php | 14 ++++++++------ wp-includes/version.php | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/wp-includes/load.php b/wp-includes/load.php index 99e4b486d6..b41e650b6b 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -451,7 +451,7 @@ function wp_start_object_cache() { wp_cache_init(); if ( function_exists( 'wp_cache_add_global_groups' ) ) { - 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' ) ); + wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache' ) ); wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); } } diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 4b0bdbc8d9..63f8270c85 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -625,10 +625,11 @@ function switch_to_blog( $new_blog, $deprecated = null ) { wp_cache_init(); if ( function_exists( 'wp_cache_add_global_groups' ) ) { - if ( is_array( $global_groups ) ) + if ( is_array( $global_groups ) ) { wp_cache_add_global_groups( $global_groups ); - else - 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' ) ); + } else { + wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', ' blog-id-cache' ) ); + } wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); } } @@ -688,10 +689,11 @@ function restore_current_blog() { wp_cache_init(); if ( function_exists( 'wp_cache_add_global_groups' ) ) { - if ( is_array( $global_groups ) ) + if ( is_array( $global_groups ) ) { wp_cache_add_global_groups( $global_groups ); - else - 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' ) ); + } else { + wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', ' blog-id-cache' ) ); + } wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index a1068ccb59..72a621cf8f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31346'; +$wp_version = '4.2-alpha-31347'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.