WP_Object_Cache::reset()publicWP 3.0.0

Deprecated from version 3.5.0. It is no longer supported and can be removed in future releases. Use WP_Object_Cache::switch_to_blog() instead.

Resets cache keys.

Method of the class: WP_Object_Cache{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Object_Cache = new WP_Object_Cache();
$WP_Object_Cache->reset();

Notes

Changelog

Since 3.0.0 Introduced.
Deprecated since 3.5.0 Use WP_Object_Cache::switch_to_blog()

WP_Object_Cache::reset() code WP 6.5.2

public function reset() {
	_deprecated_function( __FUNCTION__, '3.5.0', 'WP_Object_Cache::switch_to_blog()' );

	// Clear out non-global caches since the blog ID has changed.
	foreach ( array_keys( $this->cache ) as $group ) {
		if ( ! isset( $this->global_groups[ $group ] ) ) {
			unset( $this->cache[ $group ] );
		}
	}
}