Automattic\WooCommerce\Internal\Caches

ProductCacheController::set_product_cache_group_as_non_persistent │ public │ WC 10.5.0

Set the product_objects cache group as non-persistent.

With product instance caching enabled, products are cached in-memory during a request rather than being persisted to external cache backends. If WC_Data::__sleep()/::__wakeup() methods are eventually removed or changed so that the entire object is stored instead of just the ID, this should be revisited and evaluated performance impact.

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

Хуков нет.

Возвращает

void. Ничего (null).

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

$ProductCacheController = new ProductCacheController();
$ProductCacheController->set_product_cache_group_as_non_persistent(): void;

Список изменений

С версии 10.5.0 Введена.

Код ProductCacheController::set_product_cache_group_as_non_persistent() WC 11.2.2

public function set_product_cache_group_as_non_persistent(): void {
	wp_cache_add_non_persistent_groups( array( $this->product_cache->get_object_type() ) );
}