String
SET
Set a key to hold a string value.
Arguments
The key
The value, if this is not a string, we will use JSON.stringify
to convert it
to a string.
Instead of returning True
, this will cause the command to return the old
value stored at key, or None
when key did not exist.
Sets an expiration (in seconds) to the key.
Sets an expiration (in milliseconds) to the key.
Set the UNIX timestamp in seconds until the key expires.
Set the UNIX timestamp in milliseconds until the key expires.
Keeps the old expiration if the key already exists.
Only set the key if it does not already exist.
Only set the key if it already exists.
Response
True
if the key was set.
If get
is specified, this will return the old value stored at key, or None
when
the key did not exist.