Skip to content

Commit 36757dd

Browse files
committed
Defininando TTL no userDivicesCache igual usado no Baileys
1 parent 427c994 commit 36757dd

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
@@ -226,7 +226,10 @@ export class BaileysStartupService extends ChannelStartupService {
226226

227227
private authStateProvider: AuthStateProvider;
228228
private readonly msgRetryCounterCache: CacheStore = new NodeCache();
229-
private readonly userDevicesCache: CacheStore = new NodeCache();
229+
private readonly userDevicesCache: CacheStore = new NodeCache({
230+
stdTTL: 300000,
231+
useClones: false
232+
});
230233
private endSession = false;
231234
private logBaileys = this.configService.get<Log>('LOG').BAILEYS;
232235

0 commit comments

Comments
 (0)