Set allows for an optional parameter "GET", which causes Redis to return the previous value of the key if it existed. This adds a conditional return value to the set command, which is "OK" if "GET" was not provided in the options and is key's previous value otherwise.
Set allows for an optional parameter
"GET"
, which causes Redis to return the previous value of the key if it existed. This adds a conditional return value to theset
command, which is"OK"
if"GET"
was not provided in the options and is key's previous value otherwise.