()
| 336 | |
| 337 | /** A refresh the caller waits on — the only kind that costs it latency. */ |
| 338 | const refreshBlocking = (): Promise<CacheEntry> => { |
| 339 | blockingFetchCount += 1; |
| 340 | return refresh(); |
| 341 | }; |
| 342 | |
| 343 | const ensureFresh = async (forceRefresh: boolean): Promise<CacheEntry> => { |
| 344 | if (forceRefresh) return refreshBlocking(); |
no test coverage detected