Class: Cache

cache/cache.Cache()

General key value object cache.

Constructor

new Cache()

No parameters.
Source:

Methods

(async) delete(key) → {undefined}

Delete element with key.
Parameters:
Name Type Description
key * Element key.
Source:
Returns:
Type
undefined

(async) get(key) → {*}

Get value for key.
Parameters:
Name Type Description
key * Element key.
Source:
Returns:
Element value.
Type
*

(async) has(key) → {boolean}

Check whether has element with key.
Parameters:
Name Type Description
key * Element key.
Source:
Returns:
Whether has element with key.
Type
boolean

(async) set(key, value) → {undefined}

Set key to value.
Parameters:
Name Type Description
key * Element key.
value * Element value.
Source:
Returns:
Type
undefined