feat: remove per-customer valkey, use managed Valkey with REDIS_KEY_PREFIX

This commit is contained in:
Ryan Moon
2026-04-03 19:48:40 -05:00
parent 5df914a40f
commit 358e07b1d5
3 changed files with 7 additions and 14 deletions

View File

@@ -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)