🔧(back) configure cache key prefix

We want to change the cache key prefix using an environment variable.
This settings can be changed at every deployment in order to reset to
use a fresh new cache.
This commit is contained in:
Manuel Raynaud
2025-05-07 22:12:39 +02:00
parent 16e20e984c
commit 31d0733851
2 changed files with 6 additions and 0 deletions

View File

@@ -913,6 +913,11 @@ class Production(Base):
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
"KEY_PREFIX": values.Value(
"docs",
environ_name="CACHES_KEY_PREFIX",
environ_prefix=None,
),
},
}