1
0
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:
Kien Pham
2017-04-26 17:23:54 -07:00
parent 987e9f3b84
commit d4a332aea4

View File

@@ -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.
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
## Connection and other Events