Automattic\WooCommerce\Caching
ObjectCache::is_cached()
Is a given object cached?
Method of the class: ObjectCache{}
No Hooks.
Return
true|false
. True if there's a cached object with the specified id.
Usage
$ObjectCache = new ObjectCache(); $ObjectCache->is_cached( $id ): bool;
- $id(int|string) (required)
- The id of the object to check.
ObjectCache::is_cached() ObjectCache::is cached code WC 9.3.3
public function is_cached( $id ): bool { return $this->get_cache_engine()->is_cached( $id, $this->get_object_type() ); }