Skip to content

Conversation

rjgtav
Copy link
Contributor

@rjgtav rjgtav commented Oct 3, 2025

What?

Adds Cache-Control headers for the static files generated by Next.js (e.g. .js files).
This follows a recommendation by the OpenNext team: https://opennext.js.org/cloudflare/caching#static-assets-caching

Why?

To avoid avoiding unnecessary revalidation requests caused by Workers Static Assets' default headers.

How?

By caching the static files for up to an year.

@paulpopus paulpopus merged commit c59df45 into payloadcms:main Oct 4, 2025
24 checks passed
Copy link
Contributor

github-actions bot commented Oct 7, 2025

🚀 This is included in version v3.59.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants