getOrUpdate method
Retrieve cache value associated with key
.
In case the value is expired, cache new value from builder and return it.
Implementation
Future<V?> getOrUpdate(K key, CacheBuilderFn<V> builder) async {
return get(key) ?? add(key, await builder());
}