EXISTS

Usage:
EXISTS key [ key ...]
Complexity:
O(N) where N is the number of keys to check.
Since:
1.0.0

Returns if key exists.

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.

Examples

SET key1 "Hello"
EXISTS key1
EXISTS nosuchkey
SET key2 "World"
EXISTS key1 key2 nosuchkey

History

Version Change
3.0.3 Accepts multiple `key` arguments.