Redis 8 · Keys and strings
Set only if the key does not exist
Useful as a simple lock. Returns nil if the key exists.
SET lock:job1 1 NX EX 30
Official Redis 8 documentation
Redis 8 · Keys and strings
Useful as a simple lock. Returns nil if the key exists.
SET lock:job1 1 NX EX 30
Official Redis 8 documentation
Was this page helpful?