diff --git a/superset/views/core.py b/superset/views/core.py index 26c9e80b67..5b67a7e10b 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -2221,6 +2221,16 @@ class Superset(BaseSupersetView): return resp return 'nope' + @has_access_api + @expose('/cache_key_exist//') + @log_this + def cache_key_exist(self, key): + """Returns if a key from cache exist""" + key_exist = True if cache.get(key) else False + status = 200 if key_exist else 404 + return json_success(json.dumps({'key_exist': key_exist}), + status=status) + @has_access_api @expose('/results//') @log_this