SRANDMEMBERReturn one or more random members of a set without removing them. A negative count allows repeats.
| 语法 | SRANDMEMBER key [count] |
| 分组 | set |
| 参数个数 | -2 |
| 起始版本 | 1.0.0 |
| 标志 | readonly |
| 复杂度 | O(count) expected when count is a small fraction of the set (random-slot probing); O(N) once count exceeds a quarter of it, where copying and shuffling beats rejection sampling |
| Redis 兼容性 | full |