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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
return dispatch(opts, new CacheHandler(globalOpts, opts, handler))
}

const { value } = stream

const now = Date.now()
Copy link
Member

Choose a reason for hiding this comment

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

Please use

now () {

Copy link
Member Author

Choose a reason for hiding this comment

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

@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 from d034c54 to 13fe5e0 Compare November 14, 2024 05:28
@flakey5 flakey5 force-pushed the flakey5/20240924/cli-cache-control branch 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

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.

2 participants