From 5b578ff9b5f4585daf1df9936252f8609daa61a3 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 26 Jan 2025 16:13:41 -0500 Subject: [PATCH] Fix Compile Issues (once and for all) --- cache-handler.mjs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cache-handler.mjs b/cache-handler.mjs index 9e93ca1..b1958d3 100644 --- a/cache-handler.mjs +++ b/cache-handler.mjs @@ -1,4 +1,14 @@ -import redis from './lib/redis.js'; +import Redis from 'ioredis'; + +let redis; + +if (!redis) { + redis = new Redis(process.env.REDIS_URL); + + redis.on('error', (err) => { + console.error('Redis Client Error:', err); + }); +} export default class CacheHandler { constructor(options) {