LruCache<K extends Object, V extends Object> constructor
Creates a cache holding at most maxSize entries (must be positive).
When ttl is set, entries expire that long after they were stored.
Implementation
LruCache(int maxSize, {Duration? ttl}) : _maxSize = maxSize, _ttl = ttl, assert(maxSize > 0);