MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / saveCache

Function saveCache

tests/snippet-validation.test.cjs:90–96  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

88}
89
90function saveCache(cache) {
91 try {
92 fs.writeFileSync(CACHE_FILE, JSON.stringify(cache, null, 2));
93 } catch (error) {
94 log(`Warning: Failed to save cache: ${error.message}`, 'warning');
95 }
96}
97
98function getFileHash(filePath) {
99 const content = fs.readFileSync(filePath, 'utf8');

Callers 1

runTestsFunction · 0.85

Calls 1

logFunction · 0.70

Tested by

no test coverage detected