Fix memory leak caused by missing TTL in cache (#2044)

This commit is contained in:
Clayton Lopes
2025-11-19 10:23:34 -03:00
committed by GitHub
parent a70e4da1c4
commit ae5260fc96
3 changed files with 31 additions and 7 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export function makeLibSignalRepository(
const parsedKeys = auth.keys as SignalKeyStoreWithTransaction
const migratedSessionCache = new LRUCache<string, true>({
ttl: 7 * 24 * 60 * 60 * 1000, // 7 days
ttl: 3 * 24 * 60 * 60 * 1000, // 7 days
ttlAutopurge: true,
updateAgeOnGet: true
})
+1 -1
View File
@@ -5,7 +5,7 @@ import { isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, WAJI
export class LIDMappingStore {
private readonly mappingCache = new LRUCache<string, string>({
ttl: 7 * 24 * 60 * 60 * 1000, // 7 days
ttl: 3 * 24 * 60 * 60 * 1000, // 7 days
ttlAutopurge: true,
updateAgeOnGet: true
})