Automattic\WooCommerce\Caching

ObjectCache::is_cached()publicWC 1.0

Is a given object cached?

Метод класса: ObjectCache{}

Хуков нет.

Возвращает

true|false. True if there's a cached object with the specified id.

Использование

$ObjectCache = new ObjectCache();
$ObjectCache->is_cached( $id ): bool;
$id(int|строка) (обязательный)
The id of the object to check.

Код ObjectCache::is_cached() WC 8.7.0

public function is_cached( $id ): bool {
	return $this->get_cache_engine()->is_cached( $id, $this->get_object_type() );
}