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

Function getCache

components/dash-table/src/core/cache/index.ts:5–18  ·  view source on GitHub ↗
(
    cache: Map<CacheKeyFragment, any>,
    ...key: TKey
)

Source from the content-addressed store, hash-verified

3export type CacheKeyFragment = string | number | boolean;
4
5export function getCache<TKey extends CacheKeyFragment[]>(
6 cache: Map<CacheKeyFragment, any>,
7 ...key: TKey
8) {
9 const cacheKeys = key.slice(0, -1);
10
11 return R.reduce(
12 (c, fragment) => {
13 return c.get(fragment) || c.set(fragment, new Map()).get(fragment);
14 },
15 cache,
16 cacheKeys
17 ) as Map<CacheKeyFragment, any>;
18}

Callers 2

getFunction · 0.85
getFunction · 0.85

Calls 3

reduceMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…