Duva - Distributed Cache Server

EXISTS

Check if given keys exist

Syntax

EXISTS key [key ...]

Returns if key exists.

Example

duva-cli> SET key1 "Hello"
"OK"
duva-cli> EXISTS key1
(integer) 1
duva-cli> EXISTS nosuchkey
(integer) 0
duva-cli> SET key2 "World"
"OK"
duva-cli> EXISTS key1 key2 nosuchkey
(integer) 2
duva-cli> 

Return value: Integer reply - the value after incrementation

Notes