Redis DUMP Command Explained

The Redis DUMP command serialises the value stored at a specified key in a Redis-specific format and returns it to the user.

The serialisation format contains a 64-bit checksum that is used to make sure errors will be detected. The values are in the same format used by the RDB. Also, an RDB version is encoded inside the serialised value, so that different Redis versions with incompatible RDB formats will refuse to process the serialised value.

Continue reading

Redis SORT_RO Command Explained

The Redis SORT_RO command is a read-only variant of the SORT command. It allows us to sort lists, sets, and sorted sets.

The SORT command enables us to have the sorted elements returned to the client, or stored in a separate key. But the SORT_RO command only allows us to have them returned to the client.

The SORT_RO variant was introduced in Redis 7.0.0 to enable SORT functionality in read-only replicas without breaking compatibility on command flags.

Continue reading

Redis UNLINK Command Explained

In Redis, the UNLINK command removes the specified keys. It’s similar to the DEL command, except that it performs the memory reclaiming in a different thread, so it is not blocking. The DEL command, on the other hand, doesn’t do this.

More specifically, the UNLINK command unlinks the keys from the keyspace, and then removes it later asynchronously.

Continue reading