MCPcopy
hub / github.com/claude-code-best/claude-code / memoized

Function memoized

packages/mcp-client/src/cache.ts:37–47  ·  view source on GitHub ↗
(...args: Args)

Source from the content-addressed store, hash-verified

35 })
36
37 const memoized = (...args: Args): Result => {
38 const key = cacheFn(...args)
39 const cached = cache.get(key)
40 if (cached !== undefined) {
41 return cached
42 }
43
44 const result = f(...args)
45 cache.set(key, result)
46 return result
47 }
48
49 memoized.cache = {
50 clear: () => cache.clear(),

Callers

nothing calls this directly

Calls 3

fFunction · 0.85
setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected