Helper functions for managing generic cache.
- Source
Methods
(async, static) clear(optsopt) → {Promise.<void>}
Clear cached items from the store.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | object | <optional> | {} | The options for clearing the cache Properties
|
- Source
Returns:
- Type:
- Promise.<void>
(async, static) get(optsopt) → {Promise.<*>}
Get a cached item from the store.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | object | <optional> | {} | The options for retrieving the cached item Properties
|
- Source
Returns:
- Returns the cached item or false if not found
- Type:
- Promise.<*>
(async, static) remove(optsopt) → {Promise.<void>}
Remove a cached item from the store.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | object | <optional> | {} | The options for removing the cached item Properties
|
- Source
Returns:
- Type:
- Promise.<void>
(async, static) set(optsopt) → {Promise.<void>}
Set a cached item in the store.
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | object | <optional> | {} | The options for setting the cached item Properties
|
- Source
Returns:
- Type:
- Promise.<void>