summaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/undici/docs/api/CacheStorage.md
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-02-28 21:59:12 +0100
committerEgor Tensin <egor@tensin.name>2026-02-28 22:19:57 +0100
commit9611c248995ad3bacda1d0a93d0b5e1e6605d162 (patch)
treeeb3ae35b426e9d72e7cb34e8e9cc0453745a8e17 /node_modules/undici/docs/api/CacheStorage.md
parentDEVELOPMENT.md: expand on sources (diff)
downloadcleanup-path-9611c248995ad3bacda1d0a93d0b5e1e6605d162.tar.gz
cleanup-path-9611c248995ad3bacda1d0a93d0b5e1e6605d162.zip
upgrade actions/core to version 2
Diffstat (limited to 'node_modules/undici/docs/api/CacheStorage.md')
-rw-r--r--node_modules/undici/docs/api/CacheStorage.md30
1 files changed, 0 insertions, 30 deletions
diff --git a/node_modules/undici/docs/api/CacheStorage.md b/node_modules/undici/docs/api/CacheStorage.md
deleted file mode 100644
index 08ee99f..0000000
--- a/node_modules/undici/docs/api/CacheStorage.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# CacheStorage
-
-Undici exposes a W3C spec-compliant implementation of [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) and [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache).
-
-## Opening a Cache
-
-Undici exports a top-level CacheStorage instance. You can open a new Cache, or duplicate a Cache with an existing name, by using `CacheStorage.prototype.open`. If you open a Cache with the same name as an already-existing Cache, its list of cached Responses will be shared between both instances.
-
-```mjs
-import { caches } from 'undici'
-
-const cache_1 = await caches.open('v1')
-const cache_2 = await caches.open('v1')
-
-// Although .open() creates a new instance,
-assert(cache_1 !== cache_2)
-// The same Response is matched in both.
-assert.deepStrictEqual(await cache_1.match('/req'), await cache_2.match('/req'))
-```
-
-## Deleting a Cache
-
-If a Cache is deleted, the cached Responses/Requests can still be used.
-
-```mjs
-const response = await cache_1.match('/req')
-await caches.delete('v1')
-
-await response.text() // the Response's body
-```