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 |