Automattic\WooCommerce\Api\Infrastructure
Main::is_opcache_enabled
Whether the OPcache-backed query cache is enabled.
Defaults to true. Activation also depends on OPcache being loaded and the cache directory being writable; see QueryCache{} for the runtime capability check.
Method of the class: Main{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = Main::is_opcache_enabled(): bool;
Main::is_opcache_enabled() Main::is opcache enabled code WC 10.9.1
public static function is_opcache_enabled(): bool {
return wc_string_to_bool( get_option( self::OPTION_OPCACHE_ENABLED, 'yes' ) );
}