Automattic\WooCommerce\Admin\API\Reports
DataStore::should_use_cache
Whether or not the report should use the caching layer.
Provides an opportunity for plugins to prevent reports from using cache.
Method of the class: DataStore{}
Hooks from the method
Returns
true|false. Whether or not to utilize caching.
Usage
// protected - for code of main (parent) or child class $result = $this->should_use_cache();
DataStore::should_use_cache() DataStore::should use cache code WC 10.3.5
protected function should_use_cache() {
/**
* Determines if a report will utilize caching.
*
* @param bool $use_cache Whether or not to use cache.
* @param string $cache_key The report's cache key. Used to identify the report.
*/
return (bool) apply_filters( 'woocommerce_analytics_report_should_use_cache', true, $this->cache_key );
}