Automattic\WooCommerce\Admin\API\Reports

DataStore::set_cached_data()protectedWC 1.0

Wrapper around Cache::set().

Method of the class: DataStore{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_cached_data( $cache_key, $value );
$cache_key(string) (required)
Cache key.
$value(mixed) (required)
New value.

DataStore::set_cached_data() code WC 9.3.3

protected function set_cached_data( $cache_key, $value ) {
	if ( $this->should_use_cache() ) {
		return Cache::set( $cache_key, $value );
	}

	return true;
}