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

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -