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

UNWATCH

Forgets about watched keys of a transaction.

Usage
UNWATCH
Complexity
O(1)
Since
2.2.0
ACL Categories
@fast, @transaction
Command flags
NOSCRIPT, LOADING, STALE, FAST, ALLOW_BUSY

Flushes all the previously watched keys for a transaction.

If you call EXEC or DISCARD, there's no need to manually call UNWATCH.

Replies

RESP2

RESP3