You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SET command supports a set of options that modify its behavior:
EX seconds -- Set the specified expire time, in seconds.
PX milliseconds -- Set the specified expire time, in milliseconds.
NX -- Only set the key if it does not already exist.
XX -- Only set the key if it already exist.
KEEPTTL -- Retain the time to live associated with the key.
GET -- Return the old value stored at key, or nil when key did not exist.
Note: Since the SET command options can replace SETNX, SETEX, PSETEX, GETSET, it is possible that in future versions of > Redis these three commands will be deprecated and finally removed.
Command example:
redis> SET anotherkey "will expire in a minute" EX 60
"OK"
The text was updated successfully, but these errors were encountered:
Current implementation only has key and value as parameters for the SET method:
public set(key: string, value: string) { return this.command<string>("SET", key, value); }
Redis docs specify some extra options that might make commands such as setex deprecated in the future (https://redis.io/commands/set#options):
Command example:
The text was updated successfully, but these errors were encountered: