clean cache key
This commit is contained in:
@@ -402,6 +402,9 @@ class BaseService:
|
|||||||
password=BaseService.CACHE_PASSWORD,
|
password=BaseService.CACHE_PASSWORD,
|
||||||
decode_responses=True)
|
decode_responses=True)
|
||||||
|
|
||||||
|
if r.exists(cacheKey):
|
||||||
|
r.unlink(cacheKey)
|
||||||
|
|
||||||
# Set a key 'foo' with value 'bar'
|
# Set a key 'foo' with value 'bar'
|
||||||
json_string = json.dumps(cacheData, indent=4)
|
json_string = json.dumps(cacheData, indent=4)
|
||||||
r.set(cacheKey, json_string, ex=120)
|
r.set(cacheKey, json_string, ex=120)
|
||||||
|
|||||||
Reference in New Issue
Block a user