WPCacheEngine::is_cached()publicWC 1.0

Checks if an object is cached under a given key.

Метод класса: WPCacheEngine{}

Хуков нет.


true|false. True if there's an object cached under the given key, false otherwise.


$WPCacheEngine = new WPCacheEngine();
$WPCacheEngine->is_cached( $key, $group ): bool;
$key(строка) (обязательный)
The key to verify.
The group under which the object is cached.
По умолчанию: ''

Код WPCacheEngine::is_cached() WC 7.7.2

public function is_cached( string $key, string $group = '' ): bool {
	$prefixed_key = self::get_prefixed_key( $key, $group );
	return false !== wp_cache_get( $prefixed_key, $group );