mirror of
https://github.com/jazzband/django-defender.git
synced 2026-03-16 22:10:32 +00:00
Correctly get raw client when using django_redis cache. (#104)
This commit is contained in:
parent
cd587a4f09
commit
b2490e4e4c
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ def get_redis_connection():
|
||||||
return cache.get_master_client()
|
return cache.get_master_client()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# django_redis.cache.RedisCache case (django-redis package)
|
# django_redis.cache.RedisCache case (django-redis package)
|
||||||
return cache._client
|
return cache.client.get_client(True)
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
redis_config = parse_redis_url(config.DEFENDER_REDIS_URL)
|
redis_config = parse_redis_url(config.DEFENDER_REDIS_URL)
|
||||||
return redis.StrictRedis(
|
return redis.StrictRedis(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue