Add logs to troubleshoot performances issues

This commit is contained in:
Charles Bochet
2024-09-18 00:10:35 +02:00
parent 7cdf2dc4ec
commit 9c885861a3
3 changed files with 54 additions and 2 deletions

View File

@ -13,6 +13,8 @@ export class CacheManager<T> {
const [workspaceId] = cacheKey.split('-');
if (this.cache.has(cacheKey)) {
console.log('Cache hit for key:', cacheKey);
return this.cache.get(cacheKey)!;
}
@ -23,6 +25,7 @@ export class CacheManager<T> {
}
}
console.log('Cache miss for key:', cacheKey);
const value = await factory();
if (!value) {