refactor(service-worker): remove redundant cache operation (#30977)
At this point, the response will have been cached (or scheduled to be cached) in other code paths, so caching it again is redundant. PR Close #30977
This commit is contained in:
parent
93abc35213
commit
19e8570ac0
|
@ -395,9 +395,7 @@ export class DataGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
// No response in the cache. No choice but to fall back on the full network fetch.
|
// No response in the cache. No choice but to fall back on the full network fetch.
|
||||||
res = await networkFetch;
|
return networkFetch;
|
||||||
await this.cacheResponse(req, res, lru, true);
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private networkFetchWithTimeout(req: Request): [Promise<Response|undefined>, Promise<Response>] {
|
private networkFetchWithTimeout(req: Request): [Promise<Response|undefined>, Promise<Response>] {
|
||||||
|
|
Loading…
Reference in New Issue