Automattic\WooCommerce\Admin\API\Reports

Cache::set()public staticWC 1.0

Update cached value.

Method of the class: Cache{}

No Hooks.

Return

true|false.

Usage

$result = Cache::set( $key, $value );
$key(string) (required)
Cache key.
$value(mixed) (required)
New value.

Cache::set() code WC 7.3.0

public static function set( $key, $value ) {
	$transient_version = self::get_version();
	$transient_value   = array(
		'version' => $transient_version,
		'value'   => $value,
	);

	$result = set_transient( $key, $transient_value, WEEK_IN_SECONDS );

	return $result;
}