Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: HTTP caching headers for /api/query_results [fixes #228] #252

Merged
merged 1 commit into from
Aug 4, 2014

Conversation

amirnissim
Copy link
Contributor

No description provided.

@@ -417,7 +418,8 @@ class QueryResultAPI(BaseResource):
def get(self, query_result_id):
query_result = models.QueryResult.get_by_id(query_result_id)
if query_result:
return {'query_result': query_result.to_dict()}
data = json.dumps({'query_result': query_result.to_dict()})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not how we encode JSON data, see https://github.com/EverythingMe/redash/blob/master/redash/wsgi.py#L28

It will be best, if we can reuse the existing code (json_representation). I see that it takes headers as one param, can you check what the get method needs to return for it to use them?

@amirnissim
Copy link
Contributor Author

addressed comments. updated PR. 10x

arikfr added a commit that referenced this pull request Aug 4, 2014
perf: HTTP caching headers for /api/query_results [fixes #228]
@arikfr arikfr merged commit b1e1a32 into master Aug 4, 2014
arikfr added a commit that referenced this pull request Aug 7, 2014
Fix: dashboard filters broken after #252
@arikfr arikfr deleted the perf branch April 1, 2015 14:25
jezdez pushed a commit to jezdez/redash that referenced this pull request Nov 1, 2017
…atus_page

247 add db size to status page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants