MCPcopy
hub / github.com/plotly/dash / get

Function get

components/dash-table/src/core/cache/value.ts:7–15  ·  view source on GitHub ↗
(...key: TKey)

Source from the content-addressed store, hash-verified

5 const cache = new Map<CacheKeyFragment, any>();
6
7 function get(...key: TKey): TEntry {
8 const lastKey = key.slice(-1)[0];
9
10 const nestedCache = getCache(cache, ...key);
11
12 return nestedCache.has(lastKey)
13 ? nestedCache.get(lastKey)
14 : nestedCache.set(lastKey, fn(...key)).get(lastKey);
15 }
16
17 return {get};
18 };

Callers

nothing calls this directly

Calls 4

getCacheFunction · 0.85
fnFunction · 0.50
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected