WP_AI_Client_Cache::has( string $key ): bool

In this article

Determines whether an item is present in the cache.

Parameters

$keystringrequired
The cache item key.

Return

bool True if the item exists in the cache, false otherwise.

Source

public function has( $key ): bool {
	$found = false;
	wp_cache_get( $key, self::CACHE_GROUP, false, $found );

	return (bool) $found;
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

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