From cad4c9f92374128c56c68256be64d14703b50512 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 25 Oct 2019 10:22:40 +0200 Subject: [PATCH 1/2] Fixed broken user login when cacheops is enabled --- api/config/settings/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/config/settings/common.py b/api/config/settings/common.py index 3237718e0..f3b3fbf61 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -529,7 +529,7 @@ CACHES["default"]["OPTIONS"] = { "IGNORE_EXCEPTIONS": True, # mimics memcache behavior. # http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior } -CACHEOPS_DURATION = env("CACHEOPS_DURATION", default=0) +CACHEOPS_DURATION = env("CACHEOPS_DURATION", default=100) CACHEOPS_ENABLED = bool(CACHEOPS_DURATION) if CACHEOPS_ENABLED: @@ -538,7 +538,6 @@ if CACHEOPS_ENABLED: CACHEOPS_PREFIX = lambda _: "cacheops" # noqa CACHEOPS_DEFAULTS = {"timeout": CACHEOPS_DURATION} CACHEOPS = { - "users.user": {"ops": "get"}, "music.album": {"ops": "count"}, "music.artist": {"ops": "count"}, "music.track": {"ops": "count"}, From ae0f7588e41ff2630e86be58d1a0474def75c5eb Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 25 Oct 2019 10:23:13 +0200 Subject: [PATCH 2/2] Disabled cacheops by default --- api/config/settings/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/config/settings/common.py b/api/config/settings/common.py index f3b3fbf61..3dc2ea23b 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -529,7 +529,7 @@ CACHES["default"]["OPTIONS"] = { "IGNORE_EXCEPTIONS": True, # mimics memcache behavior. # http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior } -CACHEOPS_DURATION = env("CACHEOPS_DURATION", default=100) +CACHEOPS_DURATION = env("CACHEOPS_DURATION", default=0) CACHEOPS_ENABLED = bool(CACHEOPS_DURATION) if CACHEOPS_ENABLED: