superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] 03/03: fix: cache issue for api/v1/query (#7507)
Date Wed, 15 May 2019 00:52:09 GMT
This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch release--0.32
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit f4d3362d7c234a42de5c5f5008c6d8633d0b5db4
Author: Conglei <shiconglei@gmail.com>
AuthorDate: Tue May 14 14:21:05 2019 -0700

    fix: cache issue for api/v1/query (#7507)
    
    
    (cherry picked from commit fda10026548169b507a2ccad3049bd3305c7978b)
---
 superset/common/query_context.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset/common/query_context.py b/superset/common/query_context.py
index 5053372..e064989 100644
--- a/superset/common/query_context.py
+++ b/superset/common/query_context.py
@@ -229,16 +229,16 @@ class QueryContext:
                         df=df if df is not None else None,
                         query=query,
                     )
-                    cache_value = pkl.dumps(
+                    cache_binary = pkl.dumps(
                         cache_value, protocol=pkl.HIGHEST_PROTOCOL)
 
                     logging.info('Caching {} chars at key {}'.format(
-                        len(cache_value), cache_key))
+                        len(cache_binary), cache_key))
 
                     stats_logger.incr('set_cache_key')
                     cache.set(
                         cache_key,
-                        cache_value,
+                        cache_value=cache_binary,
                         timeout=self.cache_timeout)
                 except Exception as e:
                     # cache.set call can fail if the backend is down or if


Mime
View raw message