Automattic\WooCommerce\Caching
WPCacheEngine::is_cached()
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.
- $group(строка)
- The group under which the object is cached.
По умолчанию: ''
Код WPCacheEngine::is_cached() WPCacheEngine::is cached WC 9.3.1
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 ); }