refacto: network load and fake percent

This commit is contained in:
Julien Froidefond
2025-02-16 16:33:32 +01:00
parent a2c6bec3b3
commit 2f1dfb8e9a
3 changed files with 5 additions and 71 deletions

View File

@@ -93,6 +93,7 @@ class ServerCacheService {
type: keyof typeof ServerCacheService.DEFAULT_TTL = "DEFAULT"
): Promise<T> {
const now = Date.now();
console.log("👀 Getting or setting cache for key:", key);
const cached = this.cache.get(key);
if (cached && cached.expiry > now) {