wp-includes/cache-compat.php:330Used when switch_to_blog() and restore_current_blog() are called, but only when a persistent object cache drop-in plugin has omitted the wp_cache_switch_to_blog() function that was introduced in 3.5.0.
$blog_idint function wp_cache_switch_to_blog( $blog_id ): void { global $wp_object_cache; // Attempt to use the drop-in object cache method if it exists. if ( is_object( $wp_object_cache ) && method_exists( $wp_object_cache, 'switch_to_blog' ) ) { $wp_object_cache->switch_to_blog( $blog_id ); return; } /* * Perform a fallback blog switch, which will reinitialize the caches * for the new blog ID. */ wp_cache_switch_to_blog_fallback(); }Introduced in 7.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/cache-compat.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.