You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
quick expire example
This commit is contained in:
11
README.md
11
README.md
@@ -114,6 +114,17 @@ For a list of Redis commands, see [Redis Command Reference](http://redis.io/comm
|
|||||||
Minimal parsing is done on the replies. Commands that return a integer return JavaScript Numbers, arrays return JavaScript Array. `HGETALL` returns an Object keyed by the hash keys. All strings will either be returned as string or as buffer depending on your setting.
|
Minimal parsing is done on the replies. Commands that return a integer return JavaScript Numbers, arrays return JavaScript Array. `HGETALL` returns an Object keyed by the hash keys. All strings will either be returned as string or as buffer depending on your setting.
|
||||||
Please be aware that sending null, undefined and Boolean values will result in the value coerced to a string!
|
Please be aware that sending null, undefined and Boolean values will result in the value coerced to a string!
|
||||||
|
|
||||||
|
# Redis Commands
|
||||||
|
This library is a 1 to 1 mapping to [Redis commands](https://redis.io/commands). It is not a cache library so please refer to Redis commands page for full usage details.
|
||||||
|
|
||||||
|
Example setting key to auto expire using [setex command](https://redis.io/commands/setex)
|
||||||
|
|
||||||
|
```js
|
||||||
|
// this key will expires after 10 seconds
|
||||||
|
client.setex('myKey', 10, 'Awesome value!');
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# API
|
# API
|
||||||
|
|
||||||
## Connection and other Events
|
## Connection and other Events
|
||||||
|
Reference in New Issue
Block a user