From 1670b6d427db97b3c362475c5b98515c8927744d Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Tue, 24 Oct 2017 22:22:56 +1100 Subject: [PATCH] Switch from Memcached to Redis --- Pipfile | 1 + Pipfile.lock | 15 ++++++++++++++- lemoncurry/settings/base.py | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Pipfile b/Pipfile index f55b27d..425f5f7 100644 --- a/Pipfile +++ b/Pipfile @@ -15,6 +15,7 @@ pillow = "*" python-memcached = "*" django-favicon-plus = "*" django-meta = "*" +django-redis-cache = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 73006ad..d5ddb92 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "60ee6c91a6c7b88c2a424a70428f3f380adc142716ebe82ce35f31a10cedeb3c" + "sha256": "fa6658473328c969ebdea65f63e97d71b2c184e06918229b969cf0585a9d2a7b" }, "host-environment-markers": { "implementation_name": "cpython", @@ -67,6 +67,12 @@ ], "version": "==1.4" }, + "django-redis-cache": { + "hashes": [ + "sha256:2b4e3510bbcaf3d331975717afd6f15a36fbaf7622504599d2727dc99f90c64d" + ], + "version": "==1.7.1" + }, "gunicorn": { "hashes": [ "sha256:75af03c99389535f218cc596c7de74df4763803f7b63eb09d77e92b3956b36c6", @@ -194,6 +200,13 @@ ], "version": "==1.0.6" }, + "redis": { + "hashes": [ + "sha256:8a1900a9f2a0a44ecf6e8b5eb3e967a9909dfed219ad66df094f27f7d6f330fb", + "sha256:a22ca993cea2962dbb588f9f30d0015ac4afcc45bee27d3978c0dbe9e97c6c0f" + ], + "version": "==2.10.6" + }, "rjsmin": { "hashes": [ "sha256:dd9591aa73500b08b7db24367f8d32c6470021f39d5ab4e50c7c02e4401386f1" diff --git a/lemoncurry/settings/base.py b/lemoncurry/settings/base.py index 2298d94..ed15b6d 100644 --- a/lemoncurry/settings/base.py +++ b/lemoncurry/settings/base.py @@ -111,8 +111,8 @@ WSGI_APPLICATION = 'lemoncurry.wsgi.application' CACHES = { 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': '127.0.0.1:11211', + 'BACKEND': 'redis_cache.RedisCache', + 'LOCATION': '127.0.0.1:6380', } }