WP_AI_Client_Cache::clearpublicWP 7.0.0

Wipes clean the entire cache's keys.

This method only clears the cache group used by this adapter. If the underlying cache implementation does not support group flushing, this method returns false.

Method of the class: WP_AI_Client_Cache{}

No Hooks.

Returns

true|false. True on success and false on failure.

Usage

$WP_AI_Client_Cache = new WP_AI_Client_Cache();
$WP_AI_Client_Cache->clear(): bool;

Changelog

Since 7.0.0 Introduced.

WP_AI_Client_Cache::clear() code WP 7.0

public function clear(): bool {
	if ( ! function_exists( 'wp_cache_supports' ) || ! wp_cache_supports( 'flush_group' ) ) {
		return false;
	}

	return wp_cache_flush_group( self::CACHE_GROUP );
}