You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/15 21:44:02 UTC

[GitHub] mistercrunch closed pull request #4432: Added check cache key util

mistercrunch closed pull request #4432: Added check cache key util
URL: https://github.com/apache/incubator-superset/pull/4432
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/views/core.py b/superset/views/core.py
index 87adb6e5eb..283db8e95f 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2208,6 +2208,16 @@ def cached_key(self, key):
             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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services