Redis Commands
- A
- B
- Client
-
Cluster
- Cluster-addslots
- Cluster-addslotsrange
- Cluster-bumpepoch
- Cluster-count-failure-reports
- Cluster-countkeysinslot
- Cluster-delslots
- Cluster-delslotsrange
- Cluster-failover
- Cluster-flushslots
- Cluster-forget
- Cluster-getkeysinslot
- Cluster-help
- Cluster-info
- Cluster-keyslot
- Cluster-links
- Cluster-meet
- Cluster-myid
- Cluster-myshardid
- Cluster-nodes
- Cluster-replicas
- Cluster-replicate
- Cluster-reset
- Cluster-saveconfig
- Cluster-set-config-epoch
- Cluster-setslot
- Cluster-shards
- Cluster-slaves
- Cluster-slots
- Cluster
- Command
- Config
- D
- E
- F
- G
- H
- I
- K
- L
- M
- O
- P
- Q
- R
- S1
- S2
- T
- U
- W
- X
- Z1
- Z2
Docs > Redis Commands > S2 > Sort-ro
Read-only variant of the SORT
command. It is exactly like the original SORT
but refuses the STORE
option and can safely be used in read-only replicas.
Since the original SORT
has a STORE
option it is technically flagged as a writing command in the Redis command table. For this reason read-only replicas in a Redis Cluster will redirect it to the master instance even if the connection is in read-only mode (see the READONLY
command of Redis Cluster).
The SORT_RO
variant was introduced in order to allow SORT
behavior in read-only replicas without breaking compatibility on command flags.
See original SORT
for more details.
@examples
SORT_RO mylist BY weight_*->fieldname GET object_*->fieldname
@return
@array-reply: a list of sorted elements.