Fix uncached misses tracking

This commit is contained in:
Ajay
2024-02-08 22:15:28 -05:00
parent bd766ab430
commit af5e8cd68d

View File

@@ -103,8 +103,6 @@ if (config.redis?.enabled) {
return Promise.resolve(cache.get(key));
} else if (shouldClientCacheKey(key)) {
memoryCacheMisses++;
} else {
memoryCacheUncachedMisses++;
}
if (memoryCacheHits + memoryCacheMisses > 50000) {
@@ -189,6 +187,9 @@ if (config.redis?.enabled) {
return;
}
// For tracking
if (!shouldClientCacheKey(key)) memoryCacheUncachedMisses++;
const start = Date.now();
activeRequests++;