fix: Adjusts in redis for save instances

This commit is contained in:
Davidson Gomes
2024-04-18 10:39:24 -03:00
parent 4ed1335f89
commit 61bd5b3484
18 changed files with 178 additions and 208 deletions

View File

@@ -3,7 +3,6 @@ import { configService } from '../config/env.config';
import { eventEmitter } from '../config/event.config';
import { Logger } from '../config/logger.config';
import { dbserver } from '../libs/db.connect';
import { RedisCache } from '../libs/redis.client';
import { ChatController } from './controllers/chat.controller';
import { GroupController } from './controllers/group.controller';
import { InstanceController } from './controllers/instance.controller';
@@ -107,7 +106,7 @@ export const repository = new RepositoryBroker(
dbserver?.getClient(),
);
export const cache = new RedisCache();
export const cache = new CacheService(new CacheEngine(configService, 'instance').getEngine());
const chatwootCache = new CacheService(new CacheEngine(configService, ChatwootService.name).getEngine());
const messagesLostCache = new CacheService(new CacheEngine(configService, 'baileys').getEngine());