MCPcopy Index your code
hub / github.com/anomalyco/opencode / dispose

Function dispose

packages/app/src/utils/scoped-cache.ts:17–19  ·  view source on GitHub ↗
(key: string, entry: Entry<T>)

Source from the content-addressed store, hash-verified

15 const now = options.now ?? Date.now
16
17 const dispose = (key: string, entry: Entry<T>) => {
18 options.dispose?.(entry.value, key)
19 }
20
21 const expired = (entry: Entry<T>) => {
22 if (options.ttlMs === undefined) return false

Callers 13

sweepFunction · 0.70
pruneFunction · 0.70
removeFunction · 0.70
peekFunction · 0.70
getFunction · 0.70
clearFunction · 0.70
NewHomeFunction · 0.50

Calls 1

disposeMethod · 0.45

Tested by

no test coverage detected