update method

  1. @override
Future<V?> update(
  1. K k
)
override

Force update for a value when a future is registered

Implementation

@override
Future<V?> update(K k) async {
  if(!_futures.containsKey(k)){
    return null;
  }

  final res = await _futures[k]?.call();

  if(res != null){
    _cache[k] = res;
  }

  return res;
}