AsyncCache<T> constructor

AsyncCache<T>(
  1. Duration duration
)

Creates a cache that invalidates its contents after duration has passed.

The duration starts counting after the Future returned by fetch completes, or after the Stream returned by fetchStream emits a done event.

Implementation

AsyncCache(Duration duration) : _duration = duration;