website/docs/commands/raw-string.md
APPEND key value
If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string.
Integer reply: the length of the string after the append operation.
DECR key
Decrements the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.
Integer reply: the value of the key after decrementing it.
DECRBY key decrement
Decrements the number stored at key by the value of parameter decrement. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.
Integer reply: the value of the key after decrementing it.
GET key
Gets the value of key. If the key does not exist nil is returned.
One of the following:
GETEX key [EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | PERSIST]
Get the value of key and optionally set its expiration. GETEX is similar to GET, but is a write command with additional options.
The GETEX command supports a set of options that modify its behavior:
One of the following:
GETDEL key
Get the value of key and delete the key. This command is similar to GET, but that it also deletes the key on success (if and only if the key's value type is a string).
One of the following:
Note: GETSET is a deprecated command, use SET with the GET argument when migrating or writing new code.
GETSET key value
Atomically sets key to value and returns the old value stored at key.
One of the following:
GETRANGE key start end
Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
Bulk string reply: The substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
Note: SUBSTR is a deprecated command, use GETRANGE when migrating or writing new code.
SUBSTR key start end
Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
Bulk string reply: The substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
INCR key
Increments the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation.
Integer reply: the value of the key after the increment.
INCRBY key increment
Increments the number stored at key by the value of the parameter increment. If the key does not exist, it is set to 0 before performing the operation.
Integer reply: the value of the key after the increment.
INCRBYFLOAT key increment
Increment the string representing a floating point number stored at key by the specified increment. By using a negative increment value, the result is that the value stored at the key is decremented. If the key does not exist, it is set to 0 before performing the operation.
Bulk string reply: the value of the key after the increment.
LCS key1 key2 [LEN] [IDX] [MINMATCHLEN len] [WITHMATCHLEN]
Returns the longest common subsequence of the values stored at key1 and key2.
The LCS command supports a set of options that modify its behavior:
One of the following:
MGET key [key ...]
Returns the values of all specified keys. For every key that does not exist, the special value nil is returned.
MSET key value [key value ...]
Sets the given keys to their respective values. MSET replaces existing values with new values, just as regular SET. See MSETNX if you don't want to overwrite existing values.
Array reply: a list of values at the specified keys.
MSETNX key value [key value ...]
Sets the given keys to their respective values. MSETNX will not perform any operation at all even if just a single key already exists.
One of the following:
PSETEX key milliseconds value
PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.
Simple string reply: OK.
SET key value [NX | XX] [GET] [EX seconds | PX milliseconds] [KEEPTTL] [WITHETAG]
Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.
Options:
Any of the following:
SETEX key value
Set key to hold the string value and set key to timeout after a given number of seconds.
Simple string reply: OK.
Note: SETNX is a deprecated command, use SET with the NX argument when migrating or writing new code.
SETNX key value
Set key to hold string value if key does not exist. When key already holds a value, no operation is performed.
One of the following:
STRLEN key
Returns the length of the string value stored at key.
SETRANGE key offset value
Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.