SDIFFSTORE
Since 1.1.0Sets
Syntax
SDIFFSTORE destination key [key ...]Stores the difference of the given sets, as SDIFF computes it, at destination, replacing whatever was there, and its expiry. An empty result leaves no key at destination.
Reply
- The number of members stored.
Examples
> SADD x a b c d
(integer) 4
> SADD y c d e
(integer) 3
> SDIFFSTORE d x y
(integer) 2
> SDIFFSTORE empty x x
(integer) 0
> EXISTS empty
(integer) 0