Automattic\WooCommerce\Caching

ObjectCache::remove()publicWC 1.0

Remove an object from the cache.

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

Хуков нет.

Возвращает

true|false. True if the object is removed from the cache successfully, false otherwise (because the object wasn't cached or for other reason).

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

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

Код ObjectCache::remove() WC 8.7.0

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