WooCommerce Code Reference

Cache
in package

REST API Reports Cache class.

Table of Contents

VERSION_OPTION  = 'woocommerce_reports'
Cache version. Used to invalidate all cached values.
get()  : mixed
Get cached value.
get_version()  : string
Get cache version number.
invalidate()  : mixed
Invalidate cache.
set()  : bool
Update cached value.

Constants

VERSION_OPTION

Cache version. Used to invalidate all cached values.

public mixed VERSION_OPTION = 'woocommerce_reports'

Methods

get()

Get cached value.

public static get(string $key) : mixed
Parameters
$key : string

Cache key.

Return values
mixed

set()

Update cached value.

public static set(string $key, mixed $value) : bool
Parameters
$key : string

Cache key.

$value : mixed

New value.

Return values
bool