Methods
clear()
Empty a cache
del(key)
Remove a value from the cache.
Parameters:
Name | Type | Description |
---|---|---|
key | String | Cache key to remove |
get(key) → {Promise}
Get a value in the cache
Parameters:
Name | Type | Description |
---|---|---|
key | String | Cache key to get |
Returns:
that will eventually resolve to the value in the cache.
- Type:
- Promise
put(key, value, ttl)
Set a value in the cache
Parameters:
Name | Type | Description |
---|---|---|
key | String | Cache key to set |
value | String | Value to set the key |
ttl | String | Optional TTL |