What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.

WATCH

Monitors changes to keys to determine the execution of a transaction.

Usage
WATCH key ...
Complexity
O(1) for every key.
Since
2.2.0
ACL Categories
@fast, @transaction
Command flags
NOSCRIPT, LOADING, STALE, FAST, NO_MULTI, ALLOW_BUSY

Marks the given keys to be watched for conditional execution of a transaction.

Replies

RESP2

RESP3