(url: string, storetype?: string, signal?: AbortSignal)
| 375 | } |
| 376 | |
| 377 | async addToCache(url: string, storetype?: string, signal?: AbortSignal) { |
| 378 | const request = new Request(url, signal ? { signal } : undefined); |
| 379 | if (this.cache === undefined) { |
| 380 | this.cache = await caches.open(this.scope); |
| 381 | } |
| 382 | const result = await this.cache.match(request); |
| 383 | if (result === undefined) { |
| 384 | await this.cache.add(request); |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | /** |
| 389 | * Determine if all keys exist in the cache |
no test coverage detected