Fixed broken user login when cacheops is enabled

This commit is contained in:
Eliot Berriot 2019-10-25 10:22:40 +02:00
parent d224f74f5d
commit cad4c9f923
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
1 changed files with 1 additions and 2 deletions

View File

@ -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"},