AsyncCache<T>.ephemeral constructor Null safety


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.


AsyncCache.ephemeral() : _duration = null;