WP_Object_Cache::reset
Deprecated since 3.5.0. It is no longer supported and may 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.
Returns
null. Nothing (null).
Usage
$WP_Object_Cache = new WP_Object_Cache(); $WP_Object_Cache->reset();
Notes
- See: switch_to_blog()
Changelog
| Since 3.0.0 | Introduced. |
| Deprecated since 3.5.0 | Use WP_Object_Cache::switch_to_blog() |
WP_Object_Cache::reset() WP Object Cache::reset code WP 7.0
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 ] );
}
}
}