Automattic\WooCommerce\Caching

CacheEngine::get_cached_object()publicWC 1.0

Retrieves an object cached under a given key.

Method of the class: CacheEngine{}

No Hooks.

Return

Array|Object|null. The cached object, or null if there's no object cached under the passed key.

Usage

$CacheEngine = new CacheEngine();
$CacheEngine->get_cached_object( $key, $group );
$key(string) (required)
They key under which the object to retrieve is cached.
$group(string)
The group under which the object is cached.
Default: ''

CacheEngine::get_cached_object() code WC 8.7.0

public function get_cached_object( string $key, string $group = '' );