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/01/03 23:39:55 UTC

[GitHub] john-bodley commented on a change in pull request #4016: [cache] Using the query as the basis of the cache key

john-bodley commented on a change in pull request #4016: [cache] Using the query as the basis of the cache key
URL: https://github.com/apache/incubator-superset/pull/4016#discussion_r159554356
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -225,44 +223,41 @@ def get_json(self, force=False):
             self.get_payload(force),
             default=utils.json_int_dttm_ser, ignore_nan=True)
 
-    @property
-    def cache_key(self):
-        form_data = self.form_data.copy()
-        merge_extra_filters(form_data)
-        s = str([(k, form_data[k]) for k in sorted(form_data.keys())])
+    def cache_key(self, query_obj):
+        s = self.datasource.get_query_str(query_obj)
 
 Review comment:
   Correct. I'll add a docstring to provide more context.

----------------------------------------------------------------
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