containsKeys method

Future<Map<String, bool>> containsKeys(
  1. List<String> keys
)

Checks if the cache contains values associated with all the given keys.

Returns a map where the keys are the original keys and the values are booleans indicating whether the key exists in the cache.

Throws a CacheException if there is an error checking the keys.

Implementation

Future<Map<String, bool>> containsKeys(List<String> keys) async {
  // Default implementation that calls containsKey for each key
  // Subclasses should override this with a more efficient implementation if possible
  final result = <String, bool>{};
  for (final key in keys) {
    result[key] = await containsKey(key);
  }
  return result;
}