Redis RANDOMKEY – How to get random key stored in redis
2 months ago Lalit Bhagtani 0
In this tutorial, we will learn about how to get a random key currently stored in redis datastore by using a COMMAND – RANDOMKEY in redis-cli. The syntax of redis RANDOMKEY command is as follows :-
redis host:post> RANDOMKEY
- random key from datastore. - nil, if datastore is empty.
That’s all for how to get a random key stored in redis datastore. If you liked it, please share your thoughts in comments section and share it with others too.