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/14 09:16:02 UTC

[GitHub] xrmx commented on a change in pull request #4421: Update core.py

xrmx commented on a change in pull request #4421: Update core.py
URL: https://github.com/apache/incubator-superset/pull/4421#discussion_r168111132
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1275,13 +1276,44 @@ def filter(self, datasource_type, datasource_id, column):
             return json_error_response(DATASOURCE_MISSING_ERR)
         if not self.datasource_access(datasource):
             return json_error_response(DATASOURCE_ACCESS_ERR)
-
-        payload = json.dumps(
-            datasource.values_for_column(
-                column,
-                config.get('FILTER_SELECT_ROW_LIMIT', 10000),
-            ),
-            default=utils.json_int_dttm_ser)
+        # Implement: Cache endpoint by datasource and column
+        cache_key = hashlib.md5((datasource_id + column).encode('utf-8')).hexdigest()
+        if cache_key and cache:
 
 Review comment:
   cache_key will always evaluate True

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