(key: CACHE_KEY, entityId?: number)
| 20 | private static client: redis.RedisClient = config.redis && config.redis.isRedisCluster ? new ioredis.Cluster(config.redis.nodes, {redisOptions: config.redis.redisOptions}) : redis.createClient(config.redis) |
| 21 | |
| 22 | private static getCacheKey(key: CACHE_KEY, entityId?: number): string { |
| 23 | return `${key}:${entityId || ''}` |
| 24 | } |
| 25 | |
| 26 | public static getCache(key: CACHE_KEY, entityId?: number): Promise<string | null> { |
| 27 | const cacheKey = this.getCacheKey(key, entityId) |