Automattic\WooCommerce\Admin\API\Reports

Cache::get()public staticWC 1.0

Get cached value.

Method of the class: Cache{}

No Hooks.

Return

Mixed.

Usage

$result = Cache::get( $key );
$key(string) (required)
Cache key.

Cache::get() code WC 9.4.2

public static function get( $key ) {
	$transient_version = self::get_version();
	$transient_value   = get_transient( $key );

	if (
		isset( $transient_value['value'], $transient_value['version'] ) &&
		$transient_value['version'] === $transient_version
	) {
		return $transient_value['value'];
	}

	return false;
}