Loader<K, V> typedef

Loader<K, V> = FutureOr<V> Function(K key)

A function that produces a value for key, for when a Cache needs to populate an entry.

The loader function should either return a value synchronously or a Future which completes with the value asynchronously.

Implementation

typedef Loader<K, V> = FutureOr<V> Function(K key);