Make Redis optional

This commit is contained in:
R. Miles McCain 2020-04-17 11:32:23 -04:00
parent 7ecd90c407
commit c2a7957095
No known key found for this signature in database
GPG Key ID: 91CB47BDDF2671A5

View File

@ -177,7 +177,7 @@ STATIC_ROOT = "compiledstatic/"
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
# Redis
if not DEBUG:
if not DEBUG and os.getenv("REDIS_CACHE_LOCATION") is not None:
CACHES = {
"default": {
"BACKEND": "redis_cache.RedisCache",