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.