Merged
Conversation
This comment has been minimized.
This comment has been minimized.
BrynCooke
approved these changes
Nov 28, 2022
Contributor
BrynCooke
left a comment
There was a problem hiding this comment.
Great. It's nice to see ROUTER_PLAN_CACHE_LIMIT removed.
BrynCooke
requested changes
Nov 28, 2022
Contributor
BrynCooke
left a comment
There was a problem hiding this comment.
Actually, can we put the entire cache section in experimental for now?
cache->experimental_cache
Contributor
Author
sure, makes sense |
Contributor
Author
done in a70a05e |
o0Ignition0o
approved these changes
Nov 28, 2022
bnjjj
reviewed
Nov 28, 2022
| #[derive(Debug, Clone, Default, Deserialize, Serialize, JsonSchema)] | ||
| #[serde(deny_unknown_fields)] | ||
| pub(crate) struct Apq { | ||
| pub(crate) experimental_cache: Cache, |
Contributor
There was a problem hiding this comment.
Suggested change
| pub(crate) experimental_cache: Cache, | |
| #[serde(rename = "experimental_cache")] | |
| pub(crate) cache: Cache, |
It will be one line change if we stabilize it
| #[derive(Debug, Clone, Default, Deserialize, Serialize, JsonSchema)] | ||
| #[serde(deny_unknown_fields)] | ||
| pub(crate) struct QueryPlanning { | ||
| pub(crate) experimental_cache: Cache, |
Contributor
There was a problem hiding this comment.
Why do we need 2 different structs instead of one ?
garypen
pushed a commit
that referenced
this pull request
Nov 30, 2022
Fix #2075 This implements @BrynCooke's suggestion from #2075. I did not add the option for introspection because it did not feel very useful, and would be a breaking change for the configuration format. If we really need to cache introspection responses, that could be done as part of the whole response caching feature. Example configuration: ```yaml supergraph: apq: experimental_cache: in_memory: limit: 512 redis: urls: ["redis://..."] query_planning: experimental_cache: in_memory: limit: 512 redis: urls: ["redis://..."] ```
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #2075
This implements @BrynCooke's suggestion from #2075. I did not add the option for introspection because it did not feel very useful, and would be a breaking change for the configuration format. If we really need to cache introspection responses, that could be done as part of the whole response caching feature.
Example configuration: