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

maxAge only takes effect when you also pass a parameter on the querystring #993

Open
tdawber opened this issue Apr 17, 2016 · 1 comment

Comments

@tdawber
Copy link
Contributor

tdawber commented Apr 17, 2016

Unsure what's causing this, but it seems that the correct maxAge behaviour is only taken into account when you also pass a parameter on the querystring.

If you only pass maxAge, it doesn't re-run the query even if the ttl is passed.

@arikfr
Copy link
Member

arikfr commented Apr 18, 2016

The problem is with the logic here: https://github.com/getredash/redash/blob/master/rd_ui/app/scripts/services/resources.js#L510-L522

If the query already has a pointer to a recent query result it will ignore the maxAge value. We can fix this, but need to review how getQueryResult is being called, as I think we sometimes pass the maxAge value regardless of whether we want latest or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants