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

Function cacheStats

src/cache.js:173–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171}
172
173export function cacheStats() {
174 const total = _stats.hits + _stats.misses;
175 return {
176 enabled: isCacheEnabled(),
177 size: _store.size,
178 maxSize: MAX_ENTRIES,
179 bytes: _bytes,
180 maxBytes: maxBytes(),
181 ttlMs: TTL_MS,
182 hits: _stats.hits,
183 misses: _stats.misses,
184 stores: _stats.stores,
185 evictions: _stats.evictions,
186 skips: _stats.skips,
187 hitRate: total > 0 ? ((_stats.hits / total) * 100).toFixed(1) : '0.0',
188 };
189}
190
191export function cacheClear() {
192 _store.clear();

Callers 3

cache.test.jsFile · 0.90
handleDashboardApiFunction · 0.90
routeFunction · 0.85

Calls 2

isCacheEnabledFunction · 0.85
maxBytesFunction · 0.85

Tested by

no test coverage detected