[hotfix] delete cache key when set fails

This commit is contained in:
Maxime Beauchemin 2016-06-13 18:01:55 -07:00
parent 267c0191a8
commit bc58c5d031

View File

@ -267,6 +267,7 @@ class BaseViz(object):
# cache.set call can fail if the backend is down or if
# the key is too large or whatever other reasons
logging.warning("Could not cache key {}".format(cache_key))
cache.delete(cache_key)
payload['is_cached'] = is_cached
return self.json_dumps(payload)