From 4f054bc55529b152fc437392ab30fffe213ee2b0 Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Wed, 22 Jul 2026 13:58:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=83=D0=B1=D1=80=D0=B0=D0=BB=20=D1=83?= =?UTF-8?q?=20=D0=BA=D0=B5=D1=88=D0=B0=20ttl,=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=B5=D1=88=D0=B0=20=D0=BF=D1=80=D0=B8=20=D1=81?= =?UTF-8?q?=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/blacklist/blacklist.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/blacklist/blacklist.service.ts b/src/modules/blacklist/blacklist.service.ts index 9e6eade..bb0aae0 100644 --- a/src/modules/blacklist/blacklist.service.ts +++ b/src/modules/blacklist/blacklist.service.ts @@ -32,7 +32,7 @@ export class BlacklistService { } const allRecords = await this.blacklistReportModel.findAll({ raw: true }); if (allRecords.length > 0) { - await this.cacheManager.set(cacheKey, allRecords, 60 * 1000); + await this.cacheManager.set(cacheKey, allRecords); const check = await this.cacheManager.get(cacheKey); console.log('Данные в кэше:', check); } @@ -67,7 +67,7 @@ export class BlacklistService { where: { steam_link: link }, }); if (allRecords.length > 0) { - await this.cacheManager.set(cacheKey, allRecords, 60 * 1000); + await this.cacheManager.set(cacheKey, allRecords); const check = await this.cacheManager.get(cacheKey); console.log('Данные в кэше:', check); } @@ -150,6 +150,8 @@ export class BlacklistService { async createBlacklistRecord( blackListReportDto: BlacklistReportDto, ): Promise { + const cacheKey = 'hunt-blacklist:all'; + await this.cacheManager.del(cacheKey); const report = BlacklistReport.build(blackListReportDto); return await report.save(); }