Redis provides a couple of commands that allow us to sort the elements in a list, set, or sorted set.
The SORT
command is probably the most obvious, and does exactly what its namesake promises. However, there’s also a SORT_RO
command, which is a read-only variant of the SORT
command.