Skip to content

HGETALL.WATCH

HGETALL.WATCH key

HGETALL.WATCH creates a query subscription over the HGETALL command. The client invoking the command will receive the output of the HGETALL command (not just the notification) whenever the value against the key is updated.

You can update the key in any other client. The HGETALL.WATCH client will receive the updated value.

client1:7379> HSET k f1 v1
OK 1
client1:7379> HGETALL.WATCH k
entered the watch mode for HGETALL.WATCH k
client2:7379> HSET k f2 v2
OK 1
client1:7379> ...
entered the watch mode for HGETALL.WATCH k
OK [fingerprint=4237011426]
0) f1="v1"
1) f2="v2"