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

Function deleteCachedValue

lib/handler/cache-handler.js:471–477  ·  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

469 * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey
470 */
471function deleteCachedValue (store, cacheKey) {
472 try {
473 store.delete(cacheKey)?.catch?.(noop)
474 } catch {
475 // Fail silently
476 }
477}
478
479function deleteCachedValueIfNotModified (statusCode, store, cacheKey) {
480 if (statusCode === 304) {

Callers 3

deleteCachedUriFunction · 0.70
onResponseStartMethod · 0.70

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected