-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Labels
type: featureA new featureA new feature
Description
SET:
Set the key only when a specified condition is met
Options:
- IFEQ match-value - Set the key’s value and expiration only if its current value is equal to match-value. If the key doesn’t exist, it won’t be created
- IFNE match-value - Set the key’s value and expiration only if its current value is not equal to match-value. If the key doesn’t exist, it will be created
- IFDEQ match-digest - Set the key’s value and expiration only if the digest of its current value is equal to match-digest. If the key doesn’t exist, it won’t be created
- IFDNE match-digest - Set the key’s value and expiration only if the digest of its current value is not equal to match-digest. If the key doesn’t exist, it will be created
Reply:
- If GET was not specified, any of the following:
- Nil reply if either
- the key does not exist and XX/IFEQ/IFDEQ was specified. The key was not created.
- the key exists and NX was specified or a specified IFEQ/IFNE/IFDEQ/IFDNE condition is false. The key was not set.
- Simple string reply: OK: The key was set.
- Nil reply if either
- If GET was specified, any of the following:
- Nil reply: The key didn't exist before the SET.
- Bulk string reply: The previous value of the key (Regardless of the conditional IFEQ/IFNE/IFDEQ/IFDNE results).
DELEX:
Removes the specified key and optionally applies only when a specified condition is met
Options:
- IFEQ match-value - Only delete the key if match-value equals the current value
- IFNE match-value - Only delete the key if match-value does not equal the current value
- IFDEQ match-digest - Only delete the key if match-digest equals the current digest value
- IFDNE match-digest - Only delete the key if match-digest does not equal the current digest value
Reply:
Integer reply: the number of keys that were removed
DIGEST
Return a hex signature of the value stored in the specified key.
Reply:
- Bulk string reply: the hex signature of the key or null if the key does not exist
- Simple error reply: the command returns an error if the key is not a string
Metadata
Metadata
Assignees
Labels
type: featureA new featureA new feature