-
-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
Current Status
Currently, this package only supports a limited set of Cache-Control directives:
publicmax-ageimmutable
Proposal
Add support for additional Cache-Control directives as defined in the IANA HTTP Cache Directive Registry (https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml).
Relevant Standards
- RFC 9111 - HTTP Caching (core directives)
- RFC 8246 - HTTP Immutable Responses (for
immutabledirective) - RFC 5861 - HTTP Cache-Control Extensions for Stale Content (for
stale-while-revalidate,stale-if-error)
Suggested Additional Directives
High-priority directives commonly used in static file serving:
privateno-cacheno-storemust-revalidateproxy-revalidates-maxagestale-while-revalidatestale-if-errorno-transformmust-understand
Benefits
- More comprehensive caching control for static assets
- Better alignment with HTTP standards
- Improved developer experience with complete Cache-Control support
Implementation Considerations
- Maintain backward compatibility with existing API
- Add proper validation for directive combinations
- Consider performance impact of additional option parsing
Would you be interested in this enhancement? I'm happy to contribute to the implementation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels