diff --git a/cof/settings/common.py b/cof/settings/common.py index 261760d6..372d7d81 100644 --- a/cof/settings/common.py +++ b/cof/settings/common.py @@ -19,6 +19,7 @@ except ImportError: except KeyError: raise RuntimeError("Secrets missing") + # Other secrets try: from .secret import ( @@ -154,6 +155,18 @@ AUTHENTICATION_BACKENDS = ( RECAPTCHA_USE_SSL = True +# Cache settings + +CACHES = { + 'default': { + 'BACKEND': 'redis_cache.RedisCache', + 'LOCATION': 'redis://:{passwd}@{host}:{port}/db' + .format(passwd=REDIS_PASSWD, host=REDIS_HOST, + port=REDIS_PORT, db=REDIS_DB), + } +} + + # Channels settings CHANNEL_LAYERS = { diff --git a/requirements.txt b/requirements.txt index e3fa1ca2..b4d83eec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,7 @@ django-cas-ng==3.5.5 django-djconfig==0.5.3 django-grappelli==2.8.1 django-recaptcha==1.0.5 +django-redis-cache==1.7.1 mysqlclient==1.3.7 Pillow==3.3.0 six==1.10.0