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

Function isCacheEnabled

src/cache.js:17–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15const DEFAULT_MAX_BYTES = 16 * 1024 * 1024;
16
17function isCacheEnabled() {
18 const raw = String(process.env.RESPONSE_CACHE_ENABLED ?? process.env.WINDSURFAPI_RESPONSE_CACHE ?? '1')
19 .trim()
20 .toLowerCase();
21 return !['0', 'false', 'off', 'no'].includes(raw);
22}
23
24// Map preserves insertion order → we evict the oldest when over capacity.
25const _store = new Map();

Callers 3

cacheGetFunction · 0.85
cacheSetFunction · 0.85
cacheStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected