wp_cache_flush_group()
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.
No Hooks.
Returns
true|false. True if group was flushed, false otherwise.
Usage
wp_cache_flush_group( $group );
- $group(string) (required)
- Name of group to remove from cache.
Notes
- See: WP_Object_Cache::flush_group()
- Global. WP_Object_Cache.
$wp_object_cacheObject cache global instance.
Changelog
| Since 6.1.0 | Introduced. |
wp_cache_flush_group() wp cache flush group code WP 7.0
function wp_cache_flush_group( $group ) {
global $wp_object_cache;
return $wp_object_cache->flush_group( $group );
}