feat: remove per-customer valkey, use managed Valkey with REDIS_KEY_PREFIX
This commit is contained in:
@@ -9,7 +9,8 @@ declare module 'fastify' {
|
||||
|
||||
export const redisPlugin = fp(async (app) => {
|
||||
const redisUrl = process.env.REDIS_URL ?? 'redis://localhost:6379'
|
||||
const redis = new Redis(redisUrl)
|
||||
const keyPrefix = process.env.REDIS_KEY_PREFIX ? `${process.env.REDIS_KEY_PREFIX}:` : ''
|
||||
const redis = new Redis(redisUrl, { keyPrefix })
|
||||
|
||||
app.decorate('redis', redis)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user