Removes all cache items in a group, if the object cache implementation supports it.
Description
Before calling this function, always check for group flushing support using the wp_cache_supports( 'flush_group' )
function.
See also
Parameters
$group
stringrequired- Name of group to remove from cache.
Source
function wp_cache_flush_group( $group ) {
global $wp_object_cache;
if ( ! wp_cache_supports( 'flush_group' ) ) {
_doing_it_wrong(
__FUNCTION__,
__( 'Your object cache implementation does not support flushing individual groups.' ),
'6.1.0'
);
return false;
}
return $wp_object_cache->flush_group( $group );
}
Changelog
Version | Description |
---|---|
6.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.