1.0.0 • Published 11 years ago
redis-getcmpset v1.0.0
This package is a Redis Lua command, to be used with redis-require.
Install it with npm install redis-getcmpset.
GETCMPSET key oldValue newValue
Time complexity: O(1)
Sets key to newValue if the current value equals oldValue.
Returns the value originally stored at key. If the set succeeded, the return value will be oldValue.
Returns an error when key exists but does not hold a string value.
Return value
Bulk string reply: the value that was stored at key.
1.0.0
11 years ago