sInterStore method

Future<int> sInterStore(
  1. String destination,
  2. List<String> keys
)

SINTERSTORE destination key key ...

This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten.

Complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.

Returns:

  • int: The number of elements in the resulting set.

Implementation

Future<int> sInterStore(String destination, List<String> keys) async {
  final cmd = <String>['SINTERSTORE', destination, ...keys];
  return executeInt(cmd);
}