Automattic\WooCommerce\Caching
WPCacheEngine::delete_cached_object()
Removes a cached object from the cache.
Метод класса: WPCacheEngine{}
Хуков нет.
Возвращает
true|false
. True if the object is removed from the cache successfully, false otherwise (because the object wasn't cached or for other reason).
Использование
$WPCacheEngine = new WPCacheEngine(); $WPCacheEngine->delete_cached_object( $key, $group ): bool;
- $key(строка) (обязательный)
- They key under which the object is cached.
- $group(строка)
- The group under which the object is cached.
По умолчанию: ''
Код WPCacheEngine::delete_cached_object() WPCacheEngine::delete cached object WC 9.2.3
public function delete_cached_object( string $key, string $group = '' ): bool { $prefixed_key = self::get_prefixed_key( $key, $group ); return false !== wp_cache_delete( $prefixed_key, $group ); }