fixed more lint issues
This commit is contained in:
parent
48503ce8d1
commit
cc014de397
11 changed files with 42 additions and 11 deletions
6
libs/cache/src/index.ts
vendored
6
libs/cache/src/index.ts
vendored
|
|
@ -21,7 +21,11 @@ export function createCache(options: CacheOptions): CacheProvider {
|
|||
const cacheKey = `${defaultOptions.keyPrefix}-${defaultOptions.ttl}`;
|
||||
|
||||
if (cacheInstances.has(cacheKey)) {
|
||||
return cacheInstances.get(cacheKey)!;
|
||||
const cachedInstance = cacheInstances.get(cacheKey);
|
||||
if (!cachedInstance) {
|
||||
throw new Error(`Expected cache instance ${cacheKey} to exist`);
|
||||
}
|
||||
return cachedInstance;
|
||||
}
|
||||
|
||||
const cache = new RedisCache(defaultOptions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue