WordPress at a glance
function is not described

WP_Object_Cache::switch_to_blog() public WP 3.5.0

Switches the internal blog ID.

This changes the blog ID used to create keys in blog specific groups.

{} It's a method of the class: WP_Object_Cache{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Object_Cache = new WP_Object_Cache();
$WP_Object_Cache->switch_to_blog( $blog_id );
$blog_id(int) (required)
Blog ID.

Changelog

Since 3.5.0 Introduced.

Code of WP_Object_Cache::switch_to_blog() WP 5.7.2

<?php
public function switch_to_blog( $blog_id ) {
	$blog_id           = (int) $blog_id;
	$this->blog_prefix = $this->multisite ? $blog_id . ':' : '';
}