MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / readCache

Function readCache

src/utils/modelCache.ts:14–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14function readCache(): ModelCache | null {
15 try {
16 if (!existsSync(MODEL_CACHE_PATH)) {
17 return null;
18 }
19 const data = readFileSync(MODEL_CACHE_PATH, 'utf8');
20 return JSON.parse(data);
21 } catch {
22 return null;
23 }
24}
25
26function writeCache(models: Record<string, string[]>): void {
27 try {

Callers 3

fetchModelsForProviderFunction · 0.70
getCacheInfoFunction · 0.70
getCachedModelsFunction · 0.70

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected