Automattic\WooCommerce\Internal\Caches
VersionStringGenerator::can_use
Tells whether the version string cache can be used or not.
This will return true only if an external object cache is configured in WordPress, since otherwise the cached entries will only persist for the current request.
Method of the class: VersionStringGenerator{}
No Hooks.
Returns
true|false.
Usage
$VersionStringGenerator = new VersionStringGenerator(); $VersionStringGenerator->can_use(): bool;
VersionStringGenerator::can_use() VersionStringGenerator::can use code WC 10.4.3
public function can_use(): bool {
if ( ! is_null( $this->can_use ) ) {
return $this->can_use;
}
$this->can_use = $this->legacy_proxy->call_function( 'wp_using_ext_object_cache' ) ?? false;
return $this->can_use;
}