Redis PEXPIRE Command Explained

The Redis PEXPIRE command sets a timeout on a given key in milliseconds. After the timeout has expired, the key will be deleted.

The PEXPIRE command works exactly the same as the EXPIRE command, except that it returns the timeout in milliseconds instead of seconds.

Read more

Redis EXPIRE Command Explained

The Redis EXPIRE command sets a timeout on a given key in seconds. After the timeout has expired, the key will be deleted.

Redis also has a PEXPIRE command that works the same as EXPIRE, except that it returns the timeout in milliseconds instead of seconds.

A key with a timeout is said to be volatile in Redis terminology.

Read more

Redis APPEND Command Explained

In Redis, the APPEND command appends a given value to the end of the value of a specified key.

If the key doesn’t exist, APPEND creates the key with the empty string and appends the value to it (so it basically works like the SET command in this case).

Read more

Redis GETDEL Command Explained

The Redis GETDEL command gets the value of a given key, then deletes that key. It’s similar to the GET command, except that it deletes the key on success (the GET command doesn’t delete the key – it only returns its value).

An error is returned if the value stored at key is not a string.

The GETDEL command was introduced in Redis 6.2.0.

Read more

Redis LCS Command Explained

In Redis, the LCS command implements the longest common subsequence algorithm.

The longest common subsequence algorithm finds the longest subsequence common to all sequences in a set of sequences. Note that this is different to the longest common string algorithm (also known as the longest common substring algorithm), which requires that matching characters in the string are contiguous. The longest common subsequence algorithm, on the other hand, doesn’t require matching characters to be contiguous.

The LCS command was introduced in Redis 7.0.0.

Read more