wp_cache_reset()WP 3.0.0

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

Resets internal cache keys and structures.

If the cache back end uses global blog or site IDs as part of its cache keys, this function instructs the back end to reset those keys and perform any cleanup since blog or site IDs have changed since cache init.

This function is deprecated. Use wp_cache_switch_to_blog() instead of this function when preparing the cache for a blog switch. For clearing the cache during unit tests, consider using wp_cache_init(). wp_cache_init() is not recommended outside of unit tests as the performance penalty for using it is high.

Хуков нет.

Возвращает

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

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

wp_cache_reset();

Заметки

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

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

Код wp_cache_reset() WP 6.4.3

function wp_cache_reset() {
	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_cache_switch_to_blog()' );

	global $wp_object_cache;

	$wp_object_cache->reset();
}