mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-24 03:21:20 -05:00
feat: shared cache for next caching (#2426)
This commit is contained in:
committed by
GitHub
parent
04e43725d1
commit
ee15c2676c
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user