Use Redis for caching

This commit is contained in:
R. Miles McCain
2020-04-14 16:02:49 -04:00
parent 73b8fc96d4
commit 5368c9da12
4 changed files with 55 additions and 19 deletions

View File

@@ -140,6 +140,17 @@ STATIC_URL = "/static/"
STATIC_ROOT = "compiledstatic/"
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
# Redis
# Redis cache
if not DEBUG:
CACHES = {
"default": {
"BACKEND": "redis_cache.RedisCache",
"LOCATION": os.getenv("REDIS_CACHE_LOCATION"),
"KEY_PREFIX": "v1_", # Increment when migrations occur
}
}
# Auth