AsyncCache<T>.ephemeral constructor

AsyncCache<T>.ephemeral()

Creates a cache that invalidates after an in-flight request is complete.

An ephemeral cache guarantees that a callback function will only be executed at most once concurrently. This is useful for requests for which data is updated frequently but stale data is acceptable.

Implementation

AsyncCache.ephemeral() : _duration = null;