Cache<K, V>.empty constructor

Cache<K, V>.empty({
  1. required Loader<K, V> loader,
})

Constructs an empty or null cache, useful mostly for testing.

The loader defines the function to construct items for the cache.

Implementation

factory Cache.empty({required Loader<K, V> loader}) =>
    EmptyCache<K, V>(loader);