feat: shared cache for next caching (#2426)

This commit is contained in:
Shubham Palriwala
2024-04-12 00:35:49 +05:30
committed by GitHub
parent 04e43725d1
commit ee15c2676c
11 changed files with 61 additions and 73 deletions
+5 -3
View File
@@ -5,11 +5,13 @@ import { createClient } from "redis";
CacheHandler.onCreation(async () => {
let redisHandler;
if (process.env.REDIS_CLIENT_URL) {
if (process.env.REDIS_URL) {
const client = createClient({
url: process.env.REDIS_CLIENT_URL,
url: process.env.REDIS_URL,
});
client.on("error", (e) => {
console.error("Error in conncting to Redis client", e);
});
client.on("error", () => {});
await client.connect();
redisHandler = createRedisHandler({