Skip to content

feat: move cache control policy to standalone config section#1218

Merged
df-wg merged 6 commits intomainfrom
dave/eng-5709-move-cache-control-propagation-rule-to-own
Sep 26, 2024
Merged

feat: move cache control policy to standalone config section#1218
df-wg merged 6 commits intomainfrom
dave/eng-5709-move-cache-control-propagation-rule-to-own

Conversation

@df-wg
Copy link
Copy Markdown
Contributor

@df-wg df-wg commented Sep 24, 2024

In #1155, we added in support for having a restrictive cache control policy, as part of the header rules. This pulls out the cache control configuration into a standalone section of the configuration, for clarity and extensibility.

It can now be configured like:

cache_control_policy:
  enabled: true
  value: "max-age=180, public"
  subgraphs:
    - name: "products"
      value: "max-age=60, public"

Additionally, in #1196 we had created a set header operation. This PR adds tests to validate that using the set header operation, we can, if necessary, override the cache control restrictions, as a 'break-glass' measure.

Motivation and Context

TODO

Comment thread router/core/header_rule_engine.go Outdated
Comment thread router/core/header_rule_engine.go
Comment thread router/pkg/config/config.go Outdated
Comment thread router/core/header_rule_engine.go Outdated
@df-wg df-wg force-pushed the dave/eng-5709-move-cache-control-propagation-rule-to-own branch from f4499fe to 5148e2a Compare September 25, 2024 12:07
@df-wg df-wg requested a review from StarpTech September 25, 2024 14:12
Copy link
Copy Markdown
Contributor

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

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

LGTM

@df-wg df-wg merged commit 7c3781f into main Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants