Redis Command: STRLEN

Get the length of the saved string value of the . If the type of the value in the provided key is not a string then it reruns error.

Redis Command: GETRANGE

Get substring from a string value. The substring is obtained from the specified and the offsets are defined by the and . Counting of the index starts from Zero(0). Both the start and end index are inclusive.

Redis Command: DECR

Decrease the value stored in by One(1). If the key does not exist then this command will set the key and the value will be Zero(0), before performing the operation. And after the operation is performed, the value will be negative one(-1). If the value is not an integer, like a string that can not be covered to an integer, or a list, set, etc. then this command will return an error.

Redis Command: INCR

Increase the value stored in by One(1). Used when we want to increase some count by one. For example, we want to save- Total number of logged-in users, Number of times the user tries to log in or reset the password, Number of times the user tries to access some resource or API endpoint.

Redis Command: APPEND

Append the provided string to the existing string value of a . If the key does not exist then this command creates the key first with an empty value, then appends the provided value to that empty string. In case the does not exist then the APPEND command behaves like the SET command.

Redis Command: MSETNX

Set multiple key values if the keys do not already exist. NX represents “Not exists”. This is a very useful command if we want to set multiple key/values only if they do not already exist.

Redis Command: GETEX

Get the value of the key and additionally set the expiration time for the key. This command can work without the expiration time part, in that case, it will behave like the “GET” command.

Redis Command: MGET

Get the string values of multiple keys. As we can pass multiple keys and get the values, so it is a very handy command when we work with lots of keys. This operation always returns values without any fail, as for the non-existing keys it returns nil.