Skip to content

Commit c2baa76

Browse files
committed
Do not override cache options when using Redis with TLS
1 parent a7b3735 commit c2baa76

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/project/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,12 @@ def custom_show_toolbar(request):
373373
CACHE_CONFIG = django_cache_url.config(env=REDIS_URL_ENVVAR)
374374

375375
if environ.get('REDIS_USE_TLS', 'false').lower() == 'true':
376-
CACHE_CONFIG['OPTIONS'] = {
376+
CACHE_CONFIG.setdefault('OPTIONS', {}).update({
377377
"CLIENT_CLASS": "django_redis.client.DefaultClient",
378378
"CONNECTION_POOL_KWARGS": {
379379
"ssl_cert_reqs": None
380380
},
381-
}
381+
})
382382
CACHES = {'default': CACHE_CONFIG}
383383

384384
# Django sessions

0 commit comments

Comments
 (0)