RANDOMKEY
Syntax
RANDOMKEY
- Available since:
- 1.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@keyspace
,@read
,@slow
,
Return a random key from the currently selected database.
RESP2 Reply
One of the following:
- Nil reply: when the database is empty.
- Bulk string reply: a random key in database.
RESP3 Reply
One of the following:
- Null reply: when the database is empty.
- Bulk string reply: a random key in the database.