string. Values are capped at 512 MB.
String values are limited to 512 MB.
SETRANGE enforces this limit and returns an error if the resulting string would exceed it.GET
Returns the value stored atkey. Returns nil (null bulk string) when the key does not exist.
Syntax: GET key
SET
Setskey to value. Optionally sets a TTL or enforces a conditional write.
Syntax: SET key value [EX seconds | PX milliseconds] [NX | XX]
Expire the key after this many seconds.
Expire the key after this many milliseconds.
Only set the key if it does not already exist.
Only set the key if it already exists.
OK on success. Nil when the NX or XX condition is not met.
GETSET
Atomically setskey to a new value and returns the previous value stored at that key. Useful for implementing atomic swap patterns.
Syntax: GETSET key value
APPEND
Appendsvalue to the end of the string stored at key. If key does not exist, it is created as an empty string first.
Syntax: APPEND key value
STRLEN
Returns the byte length of the string stored atkey.
Syntax: STRLEN key
0 if the key does not exist.
GETRANGE
Returns a substring of the string stored atkey, between the start and end byte offsets (both inclusive). Negative indices count from the end: -1 is the last byte, -2 the second-to-last, and so on.
Syntax: GETRANGE key start end
SETRANGE
Overwrites part of the string stored atkey, beginning at offset. Zero-pads the string if the offset extends past the current length. The offset must be non-negative.
Syntax: SETRANGE key offset value
INCR
Increments the integer value stored atkey by 1. If the key does not exist, it is initialised to 0 before incrementing. Returns an error if the value is not a valid integer.
Syntax: INCR key
DECR
Decrements the integer value stored atkey by 1. Behaves like INCR in reverse; initialises to 0 if the key does not exist.
Syntax: DECR key
INCRBY
Increments the integer value stored atkey by the given delta.
Syntax: INCRBY key delta
DECRBY
Decrements the integer value stored atkey by the given delta.
Syntax: DECRBY key delta
MGET
Returns the values of all specified keys in order. For any key that does not exist or holds a non-string type, nil is returned in that position. Syntax:MGET key [key ...]
MSET
Sets multiple key-value pairs in a single atomic call. Existing keys are overwritten. UnlikeSET, MSET has no conditional options.
Syntax: MSET key value [key value ...]
OK.