LRUCache<K, V> constructor

LRUCache<K, V>(
  1. int _capacity
)

Creates a new LRU cache with the given capacity

Implementation

LRUCache(this._capacity) {
  if (_capacity <= 0) {
    throw ArgumentError('Capacity must be positive');
  }
}