putMany<T> method

  1. @override
void putMany<T>(
  1. Map<String, T> objects, {
  2. Duration? ttl,
})

Stores all entries from object. The optional ttl applies uniformly to every entry; pass null to skip expiration.

Implementation

@override
void putMany<T>(Map<String, T> objects, {Duration? ttl}) {
  for (final entry in objects.entries) {
    final effectiveTtl = ttl ?? _ttlPolicy.ttlFor(entry.key);
    _storage[entry.key] = _Entry(entry.value, effectiveTtl);
  }
}