ZRANGE.WATCH
Syntax
Section titled “Syntax”ZRANGE.WATCH key start stop [BYSCORE | BYRANK]
ZRANGE.WATCH creates a query subscription over the ZRANGE command. The client invoking the command will receive the output of the ZRANGE command (not just the notification) whenever the value against the key is updated.
You can update the key in any other client. The ZRANGE.WATCH client will receive the updated value.
Examples
Section titled “Examples”client1:7379> ZADD users 10 alice 20 bob 30 charlieOK 3client1:7379> ZRANGE.WATCH users 1 5entered the watch mode for ZRANGE.WATCH users
client2:7379> ZADD users 40 danielOK 1
client1:7379> ...entered the watch mode for ZRANGE.WATCH usersOK [fingerprint=1007898011883907067]1) 10, alice2) 20, bob3) 30, charlie4) 40, daniel