WP_AI_Client_Cache::clear(): bool

In this article

Wipes clean the entire cache’s keys.

Description

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.

Return

bool True on success and false on failure.

Source

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 );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.