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
- The user should be aware that if the same existing key is mentioned in the arguments multiple times, it will be counted multiple times. So if somekey exists, EXISTS somekey somekey will return 2.