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: support request cache control directives #3658

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

flakey5
Copy link
Member

@flakey5 flakey5 commented Oct 1, 2024

Note: this is a draft since #3562 isn't landed. Until it is landed, this will be based off of that pr's branch. For the actual diff see flakey5/undici@flakey5/3231...flakey5:undici:flakey5/20240924/cli-cache-control

This relates to...

Adding client side http caching (#3562)

Rationale

Changes

Features

RFC9111 allows the request to specify a cache-control header with directives that can affect how we handle the request in the cache interceptor (re 5.2.1). This adds support for them.

Bug Fixes

Breaking Changes and Deprecations

Status

cc @mcollina @ronag

@flakey5 flakey5 force-pushed the flakey5/20240924/cli-cache-control branch from 3ebfdd8 to 9a15ece Compare October 15, 2024 02:48
lib/interceptor/cache.js Outdated Show resolved Hide resolved
@flakey5 flakey5 marked this pull request as ready for review October 19, 2024 01:24
@flakey5 flakey5 force-pushed the flakey5/20240924/cli-cache-control branch from 9a15ece to a0b52e3 Compare October 19, 2024 01:24
@flakey5 flakey5 force-pushed the flakey5/20240924/cli-cache-control branch from a0b52e3 to d034c54 Compare November 2, 2024 08:23
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@flakey5 flakey5 force-pushed the flakey5/20240924/cli-cache-control branch 2 times, most recently from 13fe5e0 to 4c3dd04 Compare November 14, 2024 05:38
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@flakey5
Copy link
Member Author

flakey5 commented Nov 14, 2024

cc @ronag PTAL

lib/interceptor/cache.js Show resolved Hide resolved
test/interceptors/cache.js Show resolved Hide resolved
lib/interceptor/cache.js Outdated Show resolved Hide resolved
Co-authored-by: Robert Nagy <ronagy@icloud.com>

Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
@flakey5 flakey5 force-pushed the flakey5/20240924/cli-cache-control branch from 6ca427c to 799d7ea Compare November 18, 2024 18:20
@mcollina
Copy link
Member

@metcoder95 PTAL

@flakey5 flakey5 mentioned this pull request Nov 19, 2024
3 tasks
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 2252554 into nodejs:main Nov 19, 2024
36 checks passed
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
This was referenced Dec 16, 2024
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.

4 participants