LruCache<K, V> constructor
LruCache<K, V> ({
- int capacity = 20,
Implementation
LruCache({int capacity = 20}) {
_cache = new LinkedHashMap();
if (capacity <= 0) {
print("Capacity should be positive, force set to default capacity:${this._capacity}");
} else {
this._capacity = capacity;
}
}