(request: RequestInfo, options?: CacheQueryOptions)
| 116 | } |
| 117 | |
| 118 | async 'delete'(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean> { |
| 119 | let url = this.getRequestUrl(request); |
| 120 | if (this.cache.has(url)) { |
| 121 | this.cache.delete(url); |
| 122 | return true; |
| 123 | } else if (options?.ignoreSearch) { |
| 124 | url = this.stripQueryAndHash(url); |
| 125 | const cachedUrl = [...this.cache.keys()].find((key) => url === this.stripQueryAndHash(key)); |
| 126 | if (cachedUrl) { |
| 127 | this.cache.delete(cachedUrl); |
| 128 | return true; |
| 129 | } |
| 130 | } |
| 131 | return false; |
| 132 | } |
| 133 | |
| 134 | async keys(match?: Request | string): Promise<string[]> { |
| 135 | if (match !== undefined) { |
nothing calls this directly
no test coverage detected