English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Watch Command

Redis Transactions

The Redis Watch command is used to monitor one (or more) key, if this (or these) key is changed by other commands before the transaction is executed, the transaction will be interrupted

Syntax

Basic Syntax of Redis Watch Command:

WATCH key [key ...]

Available Version

>= 2.2.0

Return Value

Always returns OK .

Online Examples

redis> WATCH lock lock_times
OK

Redis Transactions