feat: add long-term caching for immutable assets#3128
Open
autocracy wants to merge 2 commits intotemporalio:mainfrom
Open
feat: add long-term caching for immutable assets#3128autocracy wants to merge 2 commits intotemporalio:mainfrom
autocracy wants to merge 2 commits intotemporalio:mainfrom
Conversation
Add Cache-Control headers for /_app/immutable/* paths to enable aggressive browser caching of static content-addressable filenames. This has a strong performance impact when the UI is behind a proxy that is preventing multiplexing connections. - Set Cache-Control: public, max-age=31536000, immutable (one year) - Applied in hooks.server.ts Add comprehensive test coverage for Cache-Control header middleware in hooks.server.ts: - Verify headers are set correctly for /_app/immutable/* paths - Verify headers are not set for other paths - Test preservation of existing headers - Cover various immutable asset subdirectories
|
Someone is attempting to deploy a commit to the Temporal Team on Vercel. A member of the Team first needs to authorize it. |
laurakwhit
reviewed
Feb 6, 2026
Collaborator
laurakwhit
left a comment
There was a problem hiding this comment.
Nice performance optimization! Just some very small comments to address and this should be good to go.
Collaborator
|
@autocracy if you'd like to sign the CLA we can get this merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description & motivation 💭
Add Cache-Control headers for /_app/immutable/* paths to enable aggressive browser caching of static content-addressable filenames. This has a strong performance impact when the UI is behind a proxy that is preventing multiplexing connections. Without it, I observe slow serial downloading of these static assets.
Testing 🧪
How was this tested 👻
Add comprehensive test coverage for Cache-Control header middleware in hooks.server.ts:
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Observe header application and local caching using developer tools in browser.