GETSET
Since 1.1.0Strings
Syntax
GETSET key valueSets key to value and returns the value it held before, in one step. The key's expiry is removed. SET key value GET does the same.
Reply
- The old value, or
nilif the key did not exist.
Examples
> SET a 1
OK
> GETSET a new
"1"
> GET a
"new"