redis - Why is the nxxx parameter of set() in Jedis exclusive? -
redis - Why is the nxxx parameter of set() in Jedis exclusive? -
in jedis, want set key , value expiring time single invocation.
i can combination of set() , expire() needs 2 invocations.
i found next method:
set(final string key, final string value, final string nxxx, final string expx, final long time)
but have take nx (only set key if not exist.) or xx (only set key if exist.).
i want cover both cases.
any suggestion? or reason written this?
redis has setex command, sets key expiry.
jedis.setex(key, expireafter, value);
redis jedis
Comments
Post a Comment