-
Notifications
You must be signed in to change notification settings - Fork 273
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
in memory and Redis cache configuration #2155
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. It's nice to see ROUTER_PLAN_CACHE_LIMIT removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, can we put the entire cache section in experimental for now?
cache
->experimental_cache
sure, makes sense |
done in a70a05e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#[derive(Debug, Clone, Default, Deserialize, Serialize, JsonSchema)] | ||
#[serde(deny_unknown_fields)] | ||
pub(crate) struct Apq { | ||
pub(crate) experimental_cache: Cache, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need 2 different structs instead of one ?
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://..."] ```
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: