Skip to content

feat(cache): allow REDIS_KEY_PREFIX env var to override cache KEY_PREFIX - #5

Open
mulldug wants to merge 1 commit into
masterfrom
feat/redis-key-prefix-env-var
Open

feat(cache): allow REDIS_KEY_PREFIX env var to override cache KEY_PREFIX#5
mulldug wants to merge 1 commit into
masterfrom
feat/redis-key-prefix-env-var

Conversation

@mulldug

@mulldug mulldug commented Sep 4, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/9014802374/86bbqgc34

Summary

  • Replaces the hardcoded `KEY_PREFIX` in `CACHES` with `os.getenv("REDIS_KEY_PREFIX", "")`
  • Default behaviour is unchanged — existing deployments without the env var set continue to use the same prefix as before
  • Enables operators to override the prefix per-service when multiple services share a single Valkey/Redis DB

Deployment steps

No action required for existing deployments. To use a shared Valkey DB, set `REDIS_KEY_PREFIX=` in the service's environment before deploying.

Replaces the hardcoded CACHES KEY_PREFIX string with
os.getenv("REDIS_KEY_PREFIX", "<existing value>") so that operators
can set a per-service prefix when multiple services share a single
Valkey/Redis DB, without changing the default behaviour for existing
deployments.
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9d6afc28-1677-4326-8822-d1f5ebb58bce


Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant