MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / writeCache

Function writeCache

src/utils/modelCache.ts:26–36  ·  view source on GitHub ↗
(models: Record<string, string[]>)

Source from the content-addressed store, hash-verified

24}
25
26function writeCache(models: Record<string, string[]>): void {
27 try {
28 const cache: ModelCache = {
29 timestamp: Date.now(),
30 models
31 };
32 writeFileSync(MODEL_CACHE_PATH, JSON.stringify(cache, null, 2), 'utf8');
33 } catch {
34 // Silently fail if we can't write cache
35 }
36}
37
38function isCacheValid(cache: ModelCache | null): boolean {
39 if (!cache) return false;

Callers 1

fetchModelsForProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…