MCPcopy
hub / github.com/thx/rap2-delos / getCacheKey

Method getCacheKey

src/service/redis.ts:22–24  ·  view source on GitHub ↗
(key: CACHE_KEY, entityId?: number)

Source from the content-addressed store, hash-verified

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)

Callers 3

getCacheMethod · 0.95
setCacheMethod · 0.95
delCacheMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected