Skip to content

Commit 341a0d8

Browse files
Merge pull request #1332 from theeusmartins/main
Defininando TTL no userDivicesCache igual usado no Baileys
2 parents 383bac0 + 36757dd commit 341a0d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ export class BaileysStartupService extends ChannelStartupService {
230230

231231
private authStateProvider: AuthStateProvider;
232232
private readonly msgRetryCounterCache: CacheStore = new NodeCache();
233-
private readonly userDevicesCache: CacheStore = new NodeCache();
233+
private readonly userDevicesCache: CacheStore = new NodeCache({
234+
stdTTL: 300000,
235+
useClones: false
236+
});
234237
private endSession = false;
235238
private logBaileys = this.configService.get<Log>('LOG').BAILEYS;
236239

0 commit comments

Comments
 (0)