(
url: string,
storetype?: StoreType,
signal?: AbortSignal,
)
| 701 | } |
| 702 | |
| 703 | async fetchWithCache( |
| 704 | url: string, |
| 705 | storetype?: StoreType, |
| 706 | signal?: AbortSignal, |
| 707 | ): Promise<any> { |
| 708 | const cachedResponse = await this.storage.match(url); |
| 709 | if (cachedResponse !== undefined) { |
| 710 | return this.responseToStoreType(cachedResponse, storetype); |
| 711 | } |
| 712 | await this.addToCache(url, storetype, signal); |
| 713 | const hydrated = await this.storage.match(url); |
| 714 | if (hydrated === undefined) { |
| 715 | throw new Error(`ArtifactCrossOriginStorageCache: failed to hydrate ${url}`); |
| 716 | } |
| 717 | return this.responseToStoreType(hydrated, storetype); |
| 718 | } |
| 719 | |
| 720 | async addToCache( |
| 721 | url: string, |
nothing calls this directly
no test coverage detected