wp_cache_flush_group()WP 6.1.0

Removes all cache items in a group, if the object cache implementation supports it.

Before calling this function, always check for group flushing support using the wp_cache_supports('flush_group') function.

Хуков нет.

Возвращает

bool. True if group was flushed, false otherwise.

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

wp_cache_flush_group( $group );
$group(строка) (обязательный)
Name of group to remove from cache.

Заметки

Смотрите: WP_Object_Cache::flush_group()
Global. WP_Object_Cache. $wp_object_cache Object cache global instance.

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

С версии 6.1.0 Введена.

Код wp_cache_flush_group() WP 7.1

function wp_cache_flush_group( $group ) {
	global $wp_object_cache;

	return $wp_object_cache->flush_group( $group );
}