# wp_cache_reset()

URL: https://chugunov.pro/api-wordpress/functions/wp_cache_reset/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 3.0.0.

> Устаревший элемент. Помечен устаревшим с версии 3.5.0.

## Сигнатура

```php
wp_cache_reset()
```

## Описание

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()](https://developer.wordpress.org/reference/functions/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()](https://developer.wordpress.org/reference/functions/wp_cache_init/) . [wp_cache_init()](https://developer.wordpress.org/reference/functions/wp_cache_init/) is not recommended outside of unit tests as the performance penalty for using it is high.[See also](#see-also)
- [WP_Object_Cache::reset()](https://developer.wordpress.org/reference/classes/WP_Object_Cache/reset/)

## Исходный код

Файл: `wp-includes/cache.php:409`

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

	global $wp_object_cache;

	$wp_object_cache->reset();
}
```

## История изменений

- 3.5.0 — Deprecated. Use wp_cache_switch_to_blog()
- 3.0.0 — Introduced.

## Связанные

Использует: `WP_Object_Cache::reset`, [`_deprecated_function`](https://chugunov.pro/api-wordpress/functions/_deprecated_function/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_cache_reset/
