Skip to content

HGET.WATCH

HGET.WATCH key field

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

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

client1:7379> HSET k1 f1 v1
OK 1
client1:7379> HGET.WATCH k1 f1
entered the watch mode for HGET.WATCH k1 f1
client2:7379> HSET k1 f1 v2
OK 0
client1:7379> ...
entered the watch mode for HGET.WATCH k1 f1
OK [fingerprint=3432795955] "v2"