discard.3valkey - Man Page
Discards a transaction.
Synopsis
DISCARD
Description
Flushes all previously queued commands in a transaction and restores the connection state to normal.
If WATCH
was used, DISCARD
unwatches all keys watched by the connection.
Reply
valkey-protocol(7) Simple string reply: OK
.
Complexity
O(N), when N is the number of queued commands
Acl Categories
@fast @transaction
History
- Available since: 2.0.0
See Also
exec(3valkey), multi(3valkey), unwatch(3valkey), watch(3valkey)
Info
2024-09-23 8.0.0 Valkey Command Manual