Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis Unwatch command

Redis Unwatch command

Redis Transactions

The Redis Unwatch command is used to cancel the WATCH command's monitoring of all keys.

Syntax

The basic syntax of the redis Unwatch command is as follows:



redis 127.0.0.1:6379> UNWATCH 

Available Version

= 2.2.0

Return Value

Always returns OK.

Example



redis 127.0.0.1:6379> WATCH lock lock_times

OK



redis 127.0.0.1:6379> UNWATCH

OK

Redis Transactions