feat: Make redis database configurable for cache.
Use the same redis database as openedx cache by default.
This commit is contained in:
parent
a36718277e
commit
aa65ddf9d3
@ -25,6 +25,7 @@ config = {
|
||||
"OAUTH2_KEY_DEV": "discovery-dev",
|
||||
"OAUTH2_KEY_SSO": "discovery-sso",
|
||||
"OAUTH2_KEY_SSO_DEV": "discovery-sso-dev",
|
||||
"CACHE_REDIS_DB": "{{ OPENEDX_CACHE_REDIS_DB }}",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"KEY_PREFIX": "discovery",
|
||||
"LOCATION": "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/1",
|
||||
"LOCATION": "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ DISCOVERY_CACHE_REDIS_DB }}",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user