add method
V?
add(
- K key,
- V value
Add new key
and value
entry to the cache.
Implementation
V? add(K key, V value) => _cache
.update(
key,
(CacheEntry<V> oldValue) => CacheEntry<V>(value, ttl: ttl),
ifAbsent: () => CacheEntry<V>(value, ttl: ttl),
)
.data;