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: seperate max-age and s-maxage #280

Open
moonmeister opened this issue Apr 26, 2024 · 1 comment
Open

feat: seperate max-age and s-maxage #280

moonmeister opened this issue Apr 26, 2024 · 1 comment
Labels
enhancement New feature or request needs discussion

Comments

@moonmeister
Copy link

Hey, for GET request caching the Cache-Control max-age setting also controls s-maxage. This seems counterproductive considering the plugin is purging shared caches for us...theoretically. I guess there could be shared caches beyond our CDN of choice (WP Engine Cloudflare in my case).

max-age=604800, s-maxage=604800, must-revalidate

Ideally, I'd like to tell it to never purge my CDN of choice...or on a very long timeline...but make the browser max-age very short. The option to do stale-while-revalidate or stale-while-error (though this isn't well supported) would also be slick.

Lots of ideas here. I think separating s-maxage and max-age would be good to start.

Thoughts?

@moonmeister
Copy link
Author

Note: I think the s-maxage is actually from the HEAD request before the GET. The get only has max-age. We could still improve the header capabilities.

@josephfusco josephfusco added needs discussion enhancement New feature or request labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs discussion
Projects
None yet
Development

No branches or pull requests

2 participants