diff --git a/werkout_api/settings.py b/werkout_api/settings.py index 7b9010e..c1da99b 100644 --- a/werkout_api/settings.py +++ b/werkout_api/settings.py @@ -169,6 +169,17 @@ if os.environ.get("DATABASE_URL"): } } + CACHES = { + "default": { + "BACKEND": "django_redis.cache.RedisCache", + "LOCATION": [os.environ.get('REDIS_URL', 'redis://localhost:6379')], + "OPTIONS": { + "CLIENT_CLASS": "django_redis.client.DefaultClient" + }, + } + } + + CELERY_BROKER_URL = os.environ.get("REDIS_URL", "") + "/1" CELERY_RESULT_BACKEND = os.environ.get("REDIS_URL", "") + "/1"