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

Function readCache

apps/cli/src/update-checker.ts:37–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37function readCache(): UpdateCache | null {
38 try {
39 if (fs.existsSync(CACHE_FILE)) {
40 return JSON.parse(fs.readFileSync(CACHE_FILE, 'utf-8'))
41 }
42 } catch {
43 // corrupted cache
44 }
45 return null
46}
47
48function writeCache(cache: UpdateCache): void {
49 try {

Callers 2

startPeriodicUpdateCheckFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected