Skip to documentation
Documentation menu · Add caching with Redis

Build & connect

Add caching with Redis

Use Redis with a deployed app for cache, sessions, rate limits and compatible messaging workloads.

On this page

What you will build

Flash Deploy runs the app while Redis serves cache, session or rate-limit data. Pub/sub and lightweight queues require a compatible client; check the command reference before choosing a queue library. Keep primary business data in durable storage.

Console steps

  1. Create Redis in the same org as the app.
  2. Copy its private host/port and username/password from Connection. External clients use public endpoints.
  3. Add REDIS_HOST, REDIS_PORT, REDIS_USERNAME and REDIS_PASSWORD or your app's chosen variable names to server-side env.
  4. Redeploy to apply the credentials and test a key with an expiration time.
  5. Inspect Commands, Bandwidth, Storage and Connections.
  6. Consult the command reference if your client reports a blocked command.

After deployment

Give cache keys a TTL, use clear session/rate-limit prefixes and invalidate cache when source data changes. Investigate retry loops or overly chatty endpoints when commands/second spike. Verify the app can read source data when cache is empty.