MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / writeCache

Function writeCache

apps/cli/src/update-checker.ts:48–56  ·  view source on GitHub ↗
(cache: UpdateCache)

Source from the content-addressed store, hash-verified

46}
47
48function writeCache(cache: UpdateCache): void {
49 try {
50 const dir = path.dirname(CACHE_FILE)
51 if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true })
52 fs.writeFileSync(CACHE_FILE, JSON.stringify(cache), 'utf-8')
53 } catch {
54 // non-critical
55 }
56}
57
58function isNewerVersion(latest: string, current: string): boolean {
59 const parse = (v: string) => {

Callers 2

refreshCacheInBackgroundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected