wp-includes/ms-blogs.php:611Fallback logic for switching cache context when an object cache drop-in lacks a switch_to_blog() method.
function wp_cache_switch_to_blog_fallback() { global $wp_object_cache; $global_groups = false; $non_persistent_groups = false; if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) && is_array( $wp_object_cache->global_groups ) ) { // Get the global groups as they are. $group_names = $wp_object_cache->global_groups; // Get global group keys if non-numeric array. if ( ! wp_is_numeric_array( $group_names ) ) { $group_names = array_keys( $group_names ); } $global_groups = $group_names; /* * Non-persistent groups: Check for no_mc_groups first (memcached drop-in). * Fall back to cache structure (default cache). */ if ( isset( $wp_object_cache->no_mc_groups ) && is_array( $wp_object_cache->no_mc_groups ) && ! empty( $wp_object_cache->no_mc_groups ) ) { $non_persistent_groups = $wp_object_cache->no_mc_groups; } elseif ( isset( $wp_object_cache->cache ) && is_array( $wp_object_cache->cache ) ) { $all_groups = array_keys( $wp_object_cache->cache ); $non_persistent_groups = array_values( array_diff( $all_groups, $global_groups ) ); } } wp_cache_init(); if ( function_exists( 'wp_cache_add_global_groups' ) ) { if ( ! is_array( $global_groups ) || empty( $global_groups ) ) { $global_groups = array( 'blog-details', 'blog-id-cache', 'blog-lookup', 'blog_meta', 'global-posts', 'image_editor', 'networks', 'network-queries', 'sites', 'site-details', 'site-options', 'site-queries', 'site-transient', 'theme_files', 'translation_files', 'rss', 'users', 'user-queries', 'user_meta', 'useremail', 'userlogins', 'userslugs', ); } wp_cache_add_global_groups( $global_groups ); } if ( function_exists( 'wp_cache_add_non_persistent_groups' ) ) { if ( ! is_array( $non_persistent_groups ) || empty( $non_persistent_groups ) ) { $non_persistent_groups = array( 'counts', 'plugins', 'theme_json', ); } wp_cache_add_non_persistent_groups( $non_persistent_groups ); }}Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/ms-blogs.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.