Redis Watch command
The Redis Watch command is used to monitor one (or more) key. If this (or these) key(s) are modified by other commands before the transaction executes, the transaction will be interrupted.
Syntax
The basic syntax of the redis Watch command is as follows:
WATCH key [key ...]
Available Version
= 2.2.0
Return Value
Always returns OK.
Example
redis> WATCH lock lock_times
OK