Cache<K, V>.fifo constructor

Cache<K, V>.fifo({
  1. required Loader<K, V> loader,
  2. int maximumSize = 100,
})

Constructs a First-in/First-out (FIFO) cache.

The loader defines the function to construct items for the cache; and maximumSize defines the maximum number of items cached.

Implementation

factory Cache.fifo({required Loader<K, V> loader, int maximumSize = 100}) =>
    FifoCache<K, V>(loader, maximumSize);