MCPcopy Create free account
hub / github.com/nodejs/undici / deleteCachedValue

Function deleteCachedValue

lib/handler/cache-handler.js:457–463  ·  view source on GitHub ↗

* @param {import('../../types/cache-interceptor.d.ts').default.CacheStore} store * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey

(store, cacheKey)

Source from the content-addressed store, hash-verified

455 * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey
456 */
457function deleteCachedValue (store, cacheKey) {
458 try {
459 store.delete(cacheKey)?.catch?.(noop)
460 } catch {
461 // Fail silently
462 }
463}
464
465function deleteCachedValueIfNotModified (statusCode, store, cacheKey) {
466 if (statusCode === 304) {

Callers 3

deleteCachedUriFunction · 0.70
onResponseStartMethod · 0.70

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected