fixed more lint issues

This commit is contained in:
Boki 2025-06-20 08:42:58 -04:00
parent 48503ce8d1
commit cc014de397
11 changed files with 42 additions and 11 deletions

View file

@ -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);