Redis cache
Switch CACHE_PROVIDER to Redis and configure REDIS_* variables.
Overview
By default the backend uses an in-memory cache (CACHE_PROVIDER=memory). For production (or multi-instance deployments), configure Redis and set CACHE_PROVIDER to redis.
Steps
Create a Redis database
If you don’t have Redis already, you can create one via Redis Cloud (or your preferred provider).
Once the database is ready, open your provider’s configuration/settings page and collect:
| Detail | Where to find it |
|---|---|
| Host | Public endpoint, the hostname portion (e.g. redis-*****18904.*.ap-southeast-1-1.ec2.cloud.redislabs.com) |
| Port | Public endpoint, the port number after : (e.g. 18903) |
| Password | Database Security section (often “Default user password”) |
Set the backend env variables
Edit backend/.env.development.local (or your production env) and set:
CACHE_PROVIDER=redis
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
REDIS_DB=0
REDIS_PREFIX=app:cache: Verify the connection
Start the backend and look for a Redis “connected” log line. If you see connection failures, re-check host/port/password.
Tip
You can keep CACHE_PROVIDER as memory for local dev if you don’t want Redis running.