From bc58c5d03128a517e9501d2b642c2a090a6db2de Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 13 Jun 2016 18:01:55 -0700 Subject: [PATCH] [hotfix] delete cache key when set fails --- caravel/viz.py | 1 + 1 file changed, 1 insertion(+) diff --git a/caravel/viz.py b/caravel/viz.py index 587f02356f..34a6182302 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -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)