redis.js
#
Classes#
Functions- getAsync(key) โ
Promise.<string>
Gets a string from the redis cache by key
- setAsync(key, value) โ
Promise.<void>
Sets a value with the provided key
- delAsync(key) โ
Promise.<void>
Deletes the entry with the specific key
- expireAsync(key, time) โ
Promise.<void>
Set's a key's expiration
- getNumberAsync(key) โ
Promise.<(number|null)>
Gets a number from the redis cache by key
#
RedisKind: global class
#
new Redis()Creates a Redis class
Promise.<string>
#
getAsync(key) โ Gets a string from the redis cache by key
Kind: global function
Returns: Promise.<string>
-
The value
Param | Type | Description |
---|---|---|
key | string | The key |
Promise.<void>
#
setAsync(key, value) โ Sets a value with the provided key
Kind: global function
Param | Type | Description |
---|---|---|
key | string | The key |
value | string | The value |
Promise.<void>
#
delAsync(key) โ Deletes the entry with the specific key
Kind: global function
Param | Type | Description |
---|---|---|
key | string | The key |
Promise.<void>
#
expireAsync(key, time) โ Set's a key's expiration
Kind: global function
Param | Type | Description |
---|---|---|
key | string | The key |
time | number | Time until the key should expire, in seconds |
Promise.<(number|null)>
#
getNumberAsync(key) โ Gets a number from the redis cache by key
Kind: global function
Returns: Promise.<(number|null)>
-
The value or null if there is no number
Param | Type | Description |
---|---|---|
key | string | The key |