putAll method

Future<void> putAll(
  1. Map<String, CacheItem> entries
)

Stores multiple values in the cache with the given keys.

Each value is wrapped in a CacheItem object, which allows for optional expiry.

Throws a CacheException if there is an error storing the data.

Implementation

Future<void> putAll(Map<String, CacheItem<dynamic>> entries) async {
  // Default implementation that calls put for each entry
  // Subclasses should override this with a more efficient implementation if possible
  for (final entry in entries.entries) {
    await put(entry.key, entry.value);
  }
}