Skip to content

Commit

Permalink
Do not override cache options when using Redis with TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
mjumbewu committed Jul 14, 2023
1 parent a7b3735 commit c2baa76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ def custom_show_toolbar(request):
CACHE_CONFIG = django_cache_url.config(env=REDIS_URL_ENVVAR)

if environ.get('REDIS_USE_TLS', 'false').lower() == 'true':
CACHE_CONFIG['OPTIONS'] = {
CACHE_CONFIG.setdefault('OPTIONS', {}).update({
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {
"ssl_cert_reqs": None
},
}
})
CACHES = {'default': CACHE_CONFIG}

# Django sessions
Expand Down

0 comments on commit c2baa76

Please sign in to comment.