containsKeys method

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

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

@override
Future<Map<String, bool>> containsKeys(List<String> keys) async {
  if (!_isInitialized) await init();

  final result = <String, bool>{};
  for (final key in keys) {
    result[key] = _box.containsKey(key);
  }

  return result;
}