Skip to content
Snippets Groups Projects
Verified Commit cad4c9f9 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fixed broken user login when cacheops is enabled

parent d224f74f
No related branches found
No related tags found
No related merge requests found
...@@ -529,7 +529,7 @@ CACHES["default"]["OPTIONS"] = { ...@@ -529,7 +529,7 @@ CACHES["default"]["OPTIONS"] = {
"IGNORE_EXCEPTIONS": True, # mimics memcache behavior. "IGNORE_EXCEPTIONS": True, # mimics memcache behavior.
# http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_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) CACHEOPS_ENABLED = bool(CACHEOPS_DURATION)
if CACHEOPS_ENABLED: if CACHEOPS_ENABLED:
...@@ -538,7 +538,6 @@ if CACHEOPS_ENABLED: ...@@ -538,7 +538,6 @@ if CACHEOPS_ENABLED:
CACHEOPS_PREFIX = lambda _: "cacheops" # noqa CACHEOPS_PREFIX = lambda _: "cacheops" # noqa
CACHEOPS_DEFAULTS = {"timeout": CACHEOPS_DURATION} CACHEOPS_DEFAULTS = {"timeout": CACHEOPS_DURATION}
CACHEOPS = { CACHEOPS = {
"users.user": {"ops": "get"},
"music.album": {"ops": "count"}, "music.album": {"ops": "count"},
"music.artist": {"ops": "count"}, "music.artist": {"ops": "count"},
"music.track": {"ops": "count"}, "music.track": {"ops": "count"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment