©
Ce document utilise Manuel du site Web PHP chinois Libérer
Redis Sscan 命令用于迭代集合键中的元素。
redis Sscan 命令基本语法如下:
redis 127.0.0.1:6379> SSCAN KEY [MATCH pattern] [COUNT count]
>= 1.0.0
数组列表。
redis 127.0.0.1:6379> SADD myset1 "hello" (integer) 1 redis 127.0.0.1:6379> SADD myset1 "hi" (integer) 1 redis 127.0.0.1:6379> SADD myset1 "bar" (integer) 1 redis 127.0.0.1:6379> sscan myset1 0 match h* 1) "0" 2) 1) "hello" 2) "h1"