diff --git a/cache-handler.mjs b/cache-handler.mjs index d024d1c..a6debc3 100644 --- a/cache-handler.mjs +++ b/cache-handler.mjs @@ -1,4 +1,4 @@ -import { redis } from '@/lib/redis'; +import redis from './lib/redis' export default class CacheHandler { constructor(options) { diff --git a/lib/redis.ts b/lib/redis.ts index 6076321..a91fa6a 100644 --- a/lib/redis.ts +++ b/lib/redis.ts @@ -1,6 +1,6 @@ import Redis from 'ioredis'; -let redis; +let redis: Redis | null = null; if (!redis) { redis = new Redis(process.env.REDIS_URL!);