MCPcopy
hub / github.com/nodejs/undici / delete

Method delete

lib/cache/memory-cache-store.js:205–217  ·  view source on GitHub ↗

* @param {CacheKey} key

(key)

Source from the content-addressed store, hash-verified

203 * @param {CacheKey} key
204 */
205 delete (key) {
206 if (typeof key !== 'object') {
207 throw new TypeError(`expected key to be object, got ${typeof key}`)
208 }
209
210 const topLevelKey = `${key.origin}:${key.path}`
211
212 for (const entry of this.#entries.get(topLevelKey) ?? []) {
213 this.#size -= entry.size
214 this.#count -= 1
215 }
216 this.#entries.delete(topLevelKey)
217 }
218}
219
220function findEntry (key, entries, now) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected