mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-24 14:17:47 -06:00
Path mapping & deps fix & bundler changed to tsup
This commit is contained in:
7
src/cache/cacheengine.ts
vendored
7
src/cache/cacheengine.ts
vendored
@@ -1,6 +1,7 @@
|
||||
import { ICache } from '../api/abstract/abstract.cache';
|
||||
import { CacheConf, ConfigService } from '../config/env.config';
|
||||
import { Logger } from '../config/logger.config';
|
||||
import { ICache } from '@api/abstract/abstract.cache';
|
||||
import { CacheConf, ConfigService } from '@config/env.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
|
||||
import { LocalCache } from './localcache';
|
||||
import { RedisCache } from './rediscache';
|
||||
|
||||
|
||||
5
src/cache/localcache.ts
vendored
5
src/cache/localcache.ts
vendored
@@ -1,8 +1,7 @@
|
||||
import { ICache } from '@api/abstract/abstract.cache';
|
||||
import { CacheConf, CacheConfLocal, ConfigService } from '@config/env.config';
|
||||
import NodeCache from 'node-cache';
|
||||
|
||||
import { ICache } from '../api/abstract/abstract.cache';
|
||||
import { CacheConf, CacheConfLocal, ConfigService } from '../config/env.config';
|
||||
|
||||
export class LocalCache implements ICache {
|
||||
private conf: CacheConfLocal;
|
||||
static localCache = new NodeCache();
|
||||
|
||||
7
src/cache/rediscache.client.ts
vendored
7
src/cache/rediscache.client.ts
vendored
@@ -1,10 +1,9 @@
|
||||
import { CacheConf, CacheConfRedis, configService } from '@config/env.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { createClient, RedisClientType } from 'redis';
|
||||
|
||||
import { CacheConf, CacheConfRedis, configService } from '../config/env.config';
|
||||
import { Logger } from '../config/logger.config';
|
||||
|
||||
class Redis {
|
||||
private logger = new Logger(Redis.name);
|
||||
private logger = new Logger('Redis');
|
||||
private client: RedisClientType = null;
|
||||
private conf: CacheConfRedis;
|
||||
private connected = false;
|
||||
|
||||
8
src/cache/rediscache.ts
vendored
8
src/cache/rediscache.ts
vendored
@@ -1,13 +1,13 @@
|
||||
import { ICache } from '@api/abstract/abstract.cache';
|
||||
import { CacheConf, CacheConfRedis, ConfigService } from '@config/env.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { BufferJSON } from 'baileys';
|
||||
import { RedisClientType } from 'redis';
|
||||
|
||||
import { ICache } from '../api/abstract/abstract.cache';
|
||||
import { CacheConf, CacheConfRedis, ConfigService } from '../config/env.config';
|
||||
import { Logger } from '../config/logger.config';
|
||||
import { redisClient } from './rediscache.client';
|
||||
|
||||
export class RedisCache implements ICache {
|
||||
private readonly logger = new Logger(RedisCache.name);
|
||||
private readonly logger = new Logger('RedisCache');
|
||||
private client: RedisClientType;
|
||||
private conf: CacheConfRedis;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user