Class: Cache

XOpatStorage.Cache

Cache Interface for storage of configuration / metadata. Cache is meant for cached user configuration and settings to avoid repetitive UI flows. This storage _can_ be persistent. This interface must be sync: if you use async server access, make sure to e.g. prefetch the data in given context. The default implementation stores this data within browser local storage.

Constructor

new Cache()

Source:

Extends

Methods

delete(key, key)

Parameters:
Name Type Description
key string
key
Inherited From:
Source:

get(key, defaultValue) → {*|undefined}

Parameters:
Name Type Description
key any
defaultValue any returned only in case undefined would be returned
Inherited From:
Source:
Returns:
value to store, or undefined in the default value is missing
Type
* | undefined

set(key, value)

Parameters:
Name Type Description
key string
value string
Inherited From:
Source: