Fix memory leak caused by missing TTL in cache (#2044)
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user