SINTERSTORE destination key [key …]
Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
This command is equal to SINTER, but instead of returning the resulting set, it is stored in .
If destination
already exists, it is overwritten.
*Examples
redis> SADD key1 "a"
redis> SADD key1 "b"
- (integer) 1
redis> SADD key1 "c"
redis> SADD key2 "d"
redis> SADD key2 "e"
- (integer) 1
redis> SINTERSTORE key key1 key2