From 998fb038a959d82fdbdce42f5c97e08abe42cb55 Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Mon, 11 Jun 2018 07:49:16 +0530 Subject: [PATCH] django-pylibmc: Add dependancy and use as cache backend for memcached. --- requirements/common.in | 3 +++ requirements/dev.txt | 1 + requirements/prod.txt | 1 + version.py | 2 +- zproject/settings.py | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/requirements/common.in b/requirements/common.in index d82f951592..8c5d816a42 100644 --- a/requirements/common.in +++ b/requirements/common.in @@ -108,6 +108,9 @@ pycrypto==2.6.1 # Needed for memcached usage pylibmc==1.5.2 +# Needed for compression support in memcached via pylibmc +django-pylibmc==0.6.1 + # Needed for zerver/tests/test_timestamp.py python-dateutil==2.6.1 diff --git a/requirements/dev.txt b/requirements/dev.txt index 4bea5cf1b9..1e1457e366 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -51,6 +51,7 @@ django-formtools==2.1 # via django-two-factor-auth django-otp==0.4.1.1 # via django-two-factor-auth django-phonenumber-field==1.3.0 # via django-two-factor-auth django-pipeline==1.6.14 +django-pylibmc==0.6.1 django-sendfile==0.3.11 django-statsd-mozilla==0.4.0 django-two-factor-auth==1.7.0 diff --git a/requirements/prod.txt b/requirements/prod.txt index 61f9be8075..2d30aeed20 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -38,6 +38,7 @@ django-formtools==2.1 # via django-two-factor-auth django-otp==0.4.1.1 # via django-two-factor-auth django-phonenumber-field==1.3.0 # via django-two-factor-auth django-pipeline==1.6.14 +django-pylibmc==0.6.1 django-sendfile==0.3.11 django-statsd-mozilla==0.4.0 django-two-factor-auth==1.7.0 diff --git a/version.py b/version.py index bcd424fd6b..dbe649172d 100644 --- a/version.py +++ b/version.py @@ -8,4 +8,4 @@ ZULIP_VERSION = "1.8.1+git" # Typically, adding a dependency only requires a minor version bump, and # removing a dependency requires a major version bump. -PROVISION_VERSION = '20.9' +PROVISION_VERSION = '20.10' diff --git a/zproject/settings.py b/zproject/settings.py index faf72c0003..128366f76a 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -613,7 +613,7 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" CACHES = { 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', + 'BACKEND': 'django_pylibmc.memcached.PyLibMCCache', 'LOCATION': MEMCACHED_LOCATION, 'TIMEOUT': 3600, 'OPTIONS': {