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

feat: ability to ignore cache for volume queries #13945

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

trevorwhitney
Copy link
Collaborator

What this PR does / why we need it:

Add caching option to volume requests so we can issue queries that ignore the results cache (important for some performance testing and tuning)

@trevorwhitney trevorwhitney requested a review from a team as a code owner August 21, 2024 16:55
@@ -413,6 +413,9 @@ func (Codec) DecodeRequest(_ context.Context, r *http.Request, _ []string) (quer
Step: 0,
TargetLabels: req.TargetLabels,
AggregateBy: req.AggregateBy,
CachingOptions: queryrangebase.CachingOptions{
Copy link
Contributor

Choose a reason for hiding this comment

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

should we document that these are now not cached by default? (and caching of them is not configurable by the user if we're hard coding this here?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, hmm, I missed this.... how are they not cached by default? My intent here was to keep the behavior but allow them to not be cached by setting the Cache-Control header.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, I misunderstood based on the field name. I assumed Disabled would only be present if the results caching was disabled. Missing the historical context of why the field is named Disabled and not something like ShouldCache.

@trevorwhitney trevorwhitney merged commit b1dc076 into main Aug 26, 2024
62 checks passed
@trevorwhitney trevorwhitney deleted the add-cache-options-to-volume-req branch August 26, 2024 16:40
grafanabot pushed a commit that referenced this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants