CacheEngine::cache_object()publicWC 1.0

Caches an object under a given key, and with a given expiration.

{} Это метод класса: CacheEngine{}

Хуков нет.


true|false. True if the object is cached successfully, false otherwise.


$CacheEngine = new CacheEngine();
$CacheEngine->cache_object( $key, $object, $expiration ): bool;
$key(строка) (обязательный)
The key under which the object will be cached.
$object(массив|объект) (обязательный)
The object to cache.
$expiration(int) (обязательный)
Expiration for the cached object, in seconds.

Код CacheEngine::cache_object() WC 6.9.4

public function cache_object( string $key, $object, int $expiration): bool;