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

api/v1: add cache-control header #1984

Merged
merged 3 commits into from
Jan 13, 2020

Conversation

GiedriusS
Copy link
Member

@GiedriusS GiedriusS commented Jan 10, 2020

Let's set Cache-Control to no-store if there were any warnings while
the query was being executed i.e. it is a partial response or we got
some other problem.

Seems like this works successfully in tandem with cortexproject/cortex#1974.

Tested by turning off one sidecar which leads to warnings and then Cortex Query Frontend did not save anything into the cache when querying.

Signed-off-by: Giedrius Statkevičius giedriuswork@gmail.com

Let's set `Cache-Control` to `no-store` if there were any warnings while
the query was being executed i.e. it is a partial response or we got
some other problem.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Nice idea.

Related to #1651

@bwplotka
Copy link
Member

We can't merge it, until you undraft it (:

@GiedriusS
Copy link
Member Author

We can't merge it, until you undraft it (:

I know, didn't expect such positive responses and I wasn't fast enough 😄

@GiedriusS GiedriusS marked this pull request as ready for review January 13, 2020 14:59
@GiedriusS GiedriusS merged commit 17fd999 into thanos-io:master Jan 13, 2020
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.

3 participants