Warning: This method has been deprecated. Use switch_to_blog() instead.

WP_Object_Cache::reset() WordPress Method

The WP_Object_Cache::reset() method is used to reset the object cache. This is useful when you need to clear the cache for a specific object or group of objects.

WP_Object_Cache::reset() #

Resets cache keys.


Description

Top ↑

See also


Top ↑

Source

File: wp-includes/class-wp-object-cache.php

	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 ] );
			}
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
3.5.0Use WP_Object_Cache::switch_to_blog()
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.