diff --git a/lib/cache/memory-cache-store.js b/lib/cache/memory-cache-store.js index ae6d6614d82..bd8f6e33d97 100644 --- a/lib/cache/memory-cache-store.js +++ b/lib/cache/memory-cache-store.js @@ -294,6 +294,7 @@ class MemoryStoreReadableStream extends Readable { * @type {MemoryStoreValue} */ #value + /** * @type {Buffer[]} */ diff --git a/lib/handler/cache-handler.js b/lib/handler/cache-handler.js index 419523f7e10..bad8218dac3 100644 --- a/lib/handler/cache-handler.js +++ b/lib/handler/cache-handler.js @@ -78,11 +78,7 @@ class CacheHandler extends DecoratorHandler { // https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons // Try/catch for if it's synchronous try { - const result = this.#store.deleteByOrigin(this.#requestOptions.origin) - if (typeof result?.catch === 'function') { - // Fail silently - result.catch(noop) - } + this.#store.deleteByOrigin(this.#requestOptions.origin.toString())?.catch?.(noop) } catch { // Fail silently }