MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / cacheKey

Function cacheKey

src/cache.js:129–133  ·  view source on GitHub ↗
(body, callerKey = '')

Source from the content-addressed store, hash-verified

127 * that serialize to identical strings.
128 */
129export function cacheKey(body, callerKey = '') {
130 const scope = String(callerKey || '');
131 const json = JSON.stringify(normalize(body));
132 return createHash('sha256').update(scope).update('\0').update(json).digest('hex');
133}
134
135export function cacheGet(key) {
136 if (!isCacheEnabled()) return null;

Callers 5

cache.test.jsFile · 0.90
handleChatCompletionsFunction · 0.90

Calls 1

normalizeFunction · 0.85

Tested by

no test coverage detected