WP_Object_Cache::reset()publicWP 3.0.0

Устарела с версии 3.5.0. Больше не поддерживается и может быть удалена. Используйте WP_Object_Cache::switch_to_blog().

Resets cache keys.

Метод класса: WP_Object_Cache{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Заметки

Список изменений

С версии 3.0.0 Введена.
Устарела с 3.5.0 Use WP_Object_Cache::switch_to_blog()

Код WP_Object_Cache::reset() 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 ] );
		}
	}
}