MCPcopy Create free account
hub / github.com/agegr/pi-web / getModelsCacheState

Function getModelsCacheState

lib/models-cache.ts:22–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20const MAX_MODELS_CACHE_ENTRIES = 32;
21
22function getModelsCacheState(): ModelsCacheState {
23 if (!globalThis.__piModelsCacheState) {
24 globalThis.__piModelsCacheState = {
25 entries: new Map(),
26 inFlight: new Map(),
27 generation: 0,
28 };
29 }
30 return globalThis.__piModelsCacheState;
31}
32
33export function invalidateModelsCache(): void {
34 const state = getModelsCacheState();

Callers 2

invalidateModelsCacheFunction · 0.85
loadModelsWithCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected