wuxibin89 / redis-go-cluster

redis cluster client implementation in Go
Apache License 2.0
488 stars 145 forks source link

can this pkg allow `redis set option` #27

Open shihp opened 6 years ago

shihp commented 6 years ago

set($key, $value, array('nx', 'ex' => $ttl));

https://redis.io/commands/set like this

Options
Starting with Redis 2.6.12 SET supports a set of options that modify its behavior:

EX seconds -- Set the specified expire time, in seconds.
PX milliseconds -- Set the specified expire time, in milliseconds.
NX -- Only set the key if it does not already exist.
XX -- Only set the key if it already exist.
Note: Since the SET command options can replace SETNX, SETEX, PSETEX, it is possible that in future versions of Redis these three commands will be deprecated and finally removed.