Constructor
new DataCache(options)
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Methods
(async) get(query, options, mongoOptions) → {*}
- Description:
- Retrieve cached data, or run fresh query if no cache exists or cache is invalid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
query |
Object | |
options |
Object | |
mongoOptions |
Object |
Returns:
The cached data
- Type
- *
prune()
- Description:
- Removes invalid cache data
- Source: