Skip to content

Defininando TTL no userDivicesCache igual usado no Baileys #1332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@

private authStateProvider: AuthStateProvider;
private readonly msgRetryCounterCache: CacheStore = new NodeCache();
private readonly userDevicesCache: CacheStore = new NodeCache();
private readonly userDevicesCache: CacheStore = new NodeCache({

Check failure on line 229 in src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Delete `··`
stdTTL: 300000,

Check failure on line 230 in src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Delete `····`
useClones: false

Check failure on line 231 in src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Replace `········useClones:·false` with `····useClones:·false,`
Comment on lines +229 to +231
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (bug_risk): Double-check stdTTL units for NodeCache.

NodeCache’s stdTTL option typically expects a time value in seconds. With the current value of 300000, ensure that the intended cache duration and unit are correct, so that the cache does not inadvertently persist data longer than expected.

});

Check failure on line 232 in src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

View workflow job for this annotation

GitHub Actions / check-lint-and-build

Delete `··`
private endSession = false;
private logBaileys = this.configService.get<Log>('LOG').BAILEYS;

Expand Down
Loading