mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-14 00:09:55 +02:00
quiet up some more logs
This commit is contained in:
+9
-9
@@ -10,12 +10,12 @@ export const localCache = new NodeCache({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Log cache statistics periodically for monitoring
|
// Log cache statistics periodically for monitoring
|
||||||
setInterval(() => {
|
// setInterval(() => {
|
||||||
const stats = localCache.getStats();
|
// const stats = localCache.getStats();
|
||||||
logger.debug(
|
// logger.debug(
|
||||||
`Local cache stats - Keys: ${stats.keys}, Hits: ${stats.hits}, Misses: ${stats.misses}, Hit rate: ${stats.hits > 0 ? ((stats.hits / (stats.hits + stats.misses)) * 100).toFixed(2) : 0}%`
|
// `Local cache stats - Keys: ${stats.keys}, Hits: ${stats.hits}, Misses: ${stats.misses}, Hit rate: ${stats.hits > 0 ? ((stats.hits / (stats.hits + stats.misses)) * 100).toFixed(2) : 0}%`
|
||||||
);
|
// );
|
||||||
}, 300000); // Every 5 minutes
|
// }, 300000); // Every 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adaptive cache that uses Redis when available in multi-node environments,
|
* Adaptive cache that uses Redis when available in multi-node environments,
|
||||||
@@ -34,9 +34,9 @@ class AdaptiveCache {
|
|||||||
|
|
||||||
// Use local cache as fallback or primary
|
// Use local cache as fallback or primary
|
||||||
const success = localCache.set(key, value, effectiveTtl || 0);
|
const success = localCache.set(key, value, effectiveTtl || 0);
|
||||||
if (success) {
|
// if (success) {
|
||||||
logger.debug(`Set key in local cache: ${key}`);
|
// logger.debug(`Set key in local cache: ${key}`);
|
||||||
}
|
// }
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ export const localCache = new NodeCache({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Log cache statistics periodically for monitoring
|
// Log cache statistics periodically for monitoring
|
||||||
setInterval(() => {
|
// setInterval(() => {
|
||||||
const stats = localCache.getStats();
|
// const stats = localCache.getStats();
|
||||||
logger.debug(
|
// logger.debug(
|
||||||
`Local cache stats - Keys: ${stats.keys}, Hits: ${stats.hits}, Misses: ${stats.misses}, Hit rate: ${stats.hits > 0 ? ((stats.hits / (stats.hits + stats.misses)) * 100).toFixed(2) : 0}%`
|
// `Local cache stats - Keys: ${stats.keys}, Hits: ${stats.hits}, Misses: ${stats.misses}, Hit rate: ${stats.hits > 0 ? ((stats.hits / (stats.hits + stats.misses)) * 100).toFixed(2) : 0}%`
|
||||||
);
|
// );
|
||||||
}, 300000); // Every 5 minutes
|
// }, 300000); // Every 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adaptive cache that uses Redis when available in multi-node environments,
|
* Adaptive cache that uses Redis when available in multi-node environments,
|
||||||
@@ -80,9 +80,9 @@ class AdaptiveCache {
|
|||||||
|
|
||||||
// Use local cache as fallback or primary
|
// Use local cache as fallback or primary
|
||||||
const success = localCache.set(key, value, effectiveTtl || 0);
|
const success = localCache.set(key, value, effectiveTtl || 0);
|
||||||
if (success) {
|
// if (success) {
|
||||||
logger.debug(`Set key in local cache: ${key}`);
|
// logger.debug(`Set key in local cache: ${key}`);
|
||||||
}
|
// }
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user