(models: Record<string, string[]>)
| 24 | } |
| 25 | |
| 26 | function 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 | |
| 38 | function isCacheValid(cache: ModelCache | null): boolean { |
| 39 | if (!cache) return false; |
no outgoing calls
no test coverage detected
searching dependent graphs…