WP_Object_Cache::switch_to_blog( int $blog_id )

Switches the internal blog ID.


Description Description

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


Parameters Parameters

$blog_id

(int) (Required) Blog ID.


Top ↑

Source Source

File: wp-includes/cache.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.