Redis · Command
SRANDMEMBER
Returns one or more random members from a Redis set without removing them. A positive count gives distinct members; a negative count can give repeats.
Last updated
- Since
- 1.0.0
Syntax
SRANDMEMBER key [count]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
SADDSCARDSMEMBERSSPOPSREMSSCAN