MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / purgeValues

Method purgeValues

src/compute-engine/engine-cache.ts:44–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 build: () => T,
43 purge?: (t: T) => T | undefined
44 ): T {
45 if (this._entries[cacheName] === undefined) {
46 try {
47 this._entries[cacheName] = {
48 build: build as () => unknown,
49 purge: purge as ((v: unknown) => unknown) | undefined,
50 value: build(),
51 };
52 } catch (e) {
53 // An interruption (timeout/abort) is not a cache failure: let it
54 // propagate, and leave the entry unbuilt so a later call retries.
55 // Swallowing it would return `undefined` to the caller and surface as

Callers 1

_resetMethod · 0.80

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected