many method

  1. @override
Future<Map<String, dynamic>> many(
  1. List<String> keys
)
override

Retrieves multiple values from the cache by their keys.

Returns a map of key-value pairs. Keys not found in the cache will not be present in the returned map.

  • Parameters:
    • keys: A list of keys to retrieve.

Implementation

@override
Future<Map<String, dynamic>> many(List<String> keys) async {
  final Map<String, dynamic> results = {};
  for (final key in keys) {
    final value = await get(key);
    if (value != null) {
      results[key] = value;
    }
  }
  return results;
}