Automattic\WooCommerce\Internal\Api
QueryCache::is_caching_enabled
Whether at least one cache backend is enabled (and, for OPcache, usable).
Used to short-circuit the standard-query path when neither backend is available, so the request is parsed once with no cache lookup overhead.
Method of the class: QueryCache{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->is_caching_enabled(): bool;
QueryCache::is_caching_enabled() QueryCache::is caching enabled code WC 10.9.1
private function is_caching_enabled(): bool {
return ( Main::is_opcache_enabled() && $this->is_opcache_usable() )
|| Main::is_object_cache_enabled();
}