From b74707a109749eb680f754c7f1d4f31e7a18956e Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 1 Aug 2020 06:10:03 +0300 Subject: [PATCH] Redis doesn't need to be Strict https://github.com/andymccurdy/redis-py#client-classes-redis-and-strictredis --- bin/clean_cache.py | 2 +- lib/cache.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/clean_cache.py b/bin/clean_cache.py index 1b4fe63..bc19aa8 100644 --- a/bin/clean_cache.py +++ b/bin/clean_cache.py @@ -1,6 +1,6 @@ import sys import redis -REDIS = redis.StrictRedis(host='localhost', port=6379, db=0) +REDIS = redis.Redis(host='localhost', port=6379, db=0) for key in sys.argv[1:]: REDIS.delete(key) diff --git a/lib/cache.py b/lib/cache.py index 5f55276..8e2b126 100644 --- a/lib/cache.py +++ b/lib/cache.py @@ -19,7 +19,7 @@ from config import CONFIG _REDIS = None if CONFIG['cache.type'] == 'redis': import redis - _REDIS = redis.StrictRedis( + _REDIS = redis.Redis( host=CONFIG['cache.redis.host'], port=CONFIG['cache.redis.port'], db=CONFIG['cache.redis.db'])