From 36757dddc29636a67519d49c9e4345d6b66f11f5 Mon Sep 17 00:00:00 2001 From: Matheus Martins Piedade Date: Mon, 24 Mar 2025 15:15:45 -0300 Subject: [PATCH] Defininando TTL no userDivicesCache igual usado no Baileys --- .../channel/whatsapp/whatsapp.baileys.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 10feb7ce..bcf47085 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -226,7 +226,10 @@ export class BaileysStartupService extends ChannelStartupService { private authStateProvider: AuthStateProvider; private readonly msgRetryCounterCache: CacheStore = new NodeCache(); - private readonly userDevicesCache: CacheStore = new NodeCache(); + private readonly userDevicesCache: CacheStore = new NodeCache({ + stdTTL: 300000, + useClones: false + }); private endSession = false; private logBaileys = this.configService.get('LOG').BAILEYS;