kevy

SRANDMEMBER

Return 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

← すべてのコマンド