Redis SDIFFSTORE令

1年前 (2024-04-28)
Redis SDIFFSTORE 令与 SDIFF 令作用类似,但前者是将结果保存到 destination ,而不是简单地返回结果集。如果 destination 已经存在,则将其覆盖。

注意:destination 可以是 key 本身。

可用版本

SDIFFSTORE 令可用版本:>= 1.0.0

语法

Redis SDIFFSTORE 令的基本语法如下:

SDIFFSTORE destination key [key ...] 

返回值

结果集 destination 中的元素数量。

令演示

127.0.0.1:6379> SADD website www.biancheng网站站点" rel="nofollow" />