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

← 全部命令