mirror of https://github.com/apache/superset.git
Added check cache key util (#4432)
* added check cache key util * change docstring * add has_access_api decorator
This commit is contained in:
parent
e943c25790
commit
1e99f9eb95
|
@ -2221,6 +2221,16 @@ class Superset(BaseSupersetView):
|
|||
return resp
|
||||
return 'nope'
|
||||
|
||||
@has_access_api
|
||||
@expose('/cache_key_exist/<key>/')
|
||||
@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/<key>/')
|
||||
@log_this
|
||||
|
|
Loading…
Reference in New Issue