watch

UK[wɒtʃ] US[wɑ:tʃ]

vt. Watch, pay attention; guard, monitor; wait (for opportunities, etc.); pay close attention

n. Watch; night watch, duty; guard, surveillance; person on duty

vi.Watch; watch; watch; guard

Third person singular: watches Plural: watches Now Participle: watching Past tense: watched Past participle: watched

redis WATCH command syntax

Function:Monitor one (or more) keys. If this (or these) keys are changed by other commands before the transaction is executed, the transaction will be interrupted.

Syntax: WATCH key [key ...]

Available versions: >= 2.2.0

Time complexity: O(1).

Return: Always returns OK.

redis WATCH command example

redis> WATCH lock lock_times
OK