GETSET
Syntax
Section titled “Syntax”GETSET key valueGETSET sets the value for the key and returns the old value.
The command returns "" if the key does not exist.
Examples
Section titled “Examples”localhost:7379> SET k1 v1OKlocalhost:7379> GETSET k1 v2OK "v1"localhost:7379> GET k1OK "v2"