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

Function readCacheFile

packages/node-runtime/src/cache/session-cache.ts:28–35  ·  view source on GitHub ↗
(cachePath: string)

Source from the content-addressed store, hash-verified

26}
27
28function readCacheFile(cachePath: string): CacheFile | null {
29 try {
30 if (!fs.existsSync(cachePath)) return null
31 return JSON.parse(fs.readFileSync(cachePath, 'utf-8')) as CacheFile
32 } catch {
33 return null
34 }
35}
36
37function writeCacheFile(cachePath: string, content: CacheFile): void {
38 try {

Callers 3

getCacheFunction · 0.85
setCacheFunction · 0.85
invalidateCacheFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected