Skip to content

cache: honour unqualified no-cache response directive #4178

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

Merged
merged 4 commits into from
Apr 23, 2025

Conversation

alxndrsn
Copy link
Contributor

Closes #4173

This relates to...

Rationale

https://datatracker.ietf.org/doc/html/rfc9111#name-no-cache-2:

The no-cache response directive, in its unqualified form (without an argument), indicates that the response MUST NOT be used to satisfy any other request without forwarding it for validation and receiving a successful response

Changes

Add additional check of no-cache directive of cached response when deciding if it needs revalidation.

Features

Na?

Bug Fixes

Breaking Changes and Deprecations

Changes caching behaviour.

Status

@alxndrsn alxndrsn marked this pull request as ready for review April 23, 2025 05:56
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 c0e634d into nodejs:main Apr 23, 2025
28 of 31 checks passed
dhalbrook pushed a commit to dhalbrook/undici that referenced this pull request Apr 24, 2025
* cache: honour unqualified no-cache response directive

Closes nodejs#4173

* move test to interceptors/cache.js

* lint

* remove duplicate close()

---------

Co-authored-by: alxndrsn <alxndrsn>
dhalbrook added a commit to dhalbrook/undici that referenced this pull request Apr 24, 2025
@alxndrsn alxndrsn deleted the no-cache-response-directive branch April 25, 2025 06:26
This was referenced May 10, 2025
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.

Cache prioritises cacheByDefault/max-age over no-cache response directive
4 participants