WATCH(3valkey)
π WATCH (3valkey) β the valkey command manual, bestie edition β¨
okay so you found the WATCH page, welcome to the group chat π«Ά this one lives in the Valkey Command Manual, and honestly? it's giving gatekeeper of your transactions. let's get into it.
β¨ NAME β¨
watch β keeps an eye on your keys so it can decide whether a transaction actually gets to run. like a bouncer but for EXEC. π
πΈ SYNOPSIS πΈ
WATCH key [key...]
π DESCRIPTION π
so basically, WATCH marks the keys you hand it as watched β and those watched keys are what decide whether a transaction gets to execute conditionally. it's the "hey, keep watching this, i'm about to do something and i need to know if anyone messes with it" of it all. π
π¦ REPLY π¦
per valkey-protocol(7), you get back a Simple string reply: OK. that's it, that's the reply. short, sweet, iconic. β¨
π COMPLEXITY π
O(1) for every key. so, like, one per key, no matter what. ate. π₯
π ACL CATEGORIES π
@fast@transaction
π HISTORY π
- Available since:
2.2.0β yeah, she's been here a minute, lowkey a legend. π
π«Ά SEE ALSO π«Ά
the whole transaction bestie squad, fr fr. go read them together, iykyk. π
ngl if you're running a transaction without knowing these four, you're not the main character of your own data integrity. no cap. π
and that's the page!! π this was the 9.0.0 version, dated 2025-10-21 β mwah, periodt, go watch some keys bestie π β¨πΈπ¦π
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms