Conversation
Member
forgetso
commented
Mar 25, 2026
- Cache based on last modified
- docs(changeset): Cache based on last modified
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Last-Modified–based validation to the Node-only cacheFile utility, allowing caching/revalidation when ETag is not provided by the server.
Changes:
- Implement Last-Modified filename encoding/decoding and
If-Modified-Sincefetch flow as a fallback to ETag. - Update
cacheFilelogic to choose between ETag and Last-Modified revalidation and cache accordingly. - Extend unit tests to cover Last-Modified round-tripping and empty-body handling; add a util changeset entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| packages/util/src/cacheFile.ts | Adds Last-Modified fetch/save support and updates cache decision logic (ETag-first, LM fallback). |
| packages/util/src/tests/cacheFile.unit.test.ts | Refactors ETag tests to use sequential mocks; adds new Last-Modified test suite. |
| .changeset/cute-states-exist.md | Publishes a patch changeset describing the new caching behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… into feat/cache-last-modified
light-source
pushed a commit
that referenced
this pull request
Mar 30, 2026
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.