MCPcopy Create free account
hub / github.com/Devographics/Monorepo / initMemoryCache

Function initMemoryCache

api/src/init.ts:36–45  ·  view source on GitHub ↗
({ context, initList = defaultInitList }: InitProps)

Source from the content-addressed store, hash-verified

34 * it delegates the actual caching to each "initFunction"
35 */
36export const initMemoryCache = async ({ context, initList = defaultInitList }: InitProps) => {
37 console.log(`// Initializing in-memory cache for ${initList.join(', ')}…`)
38 const data: any = {}
39 for (const initFunctionName of initList) {
40 const f = initFunctions[initFunctionName]
41 const result = await f({ context })
42 data[initFunctionName] = result
43 }
44 return data
45}
46
47interface InitDbCacheProps extends InitProps {
48 data: any

Callers 2

watchFilesFunction · 0.90
reinitializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected