refresh method
Forces one fetch, coalesced with any in-flight fetch (E3: exactly one attempt per refresh).
Implementation
Future<QuotaFetchResult> refresh(String providerId) {
return _inFlight.putIfAbsent(providerId, () async {
try {
final result = await _fetchOnce(providerId);
if (result != null) {
_cache[providerId] = _CacheEntry(result, _clockNow);
_changes.add(null);
}
return result ?? _noSource();
} finally {
_inFlight.remove(providerId);
}
});
}