Redis SUNIONSTORE令

1年前 (2024-04-26)

Redis SUNIONSTORE 令类似于 SUNION 令,但它将结果保存到 destination ,而不是简单地返回结果集。如果 destination 已经存在,则将其覆盖。

注意:destination 可以是 key 本身。

可用版本

SUNIONSTORE 令可用版本:>= 1.0.0

语法

Redis SUNIONSTORE 令的基本语法如下:

SUNIONSTORE destination key [key ...]   

返回值

结果集中的元素数量。

令演示

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