Skip to content

Fix fetch cache for isr #783

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

Merged
merged 7 commits into from
Mar 20, 2025
Merged

Fix fetch cache for isr #783

merged 7 commits into from
Mar 20, 2025

Conversation

conico974
Copy link
Contributor

Patch the fetch cache and unstable_cache so that they does not get revalidated (if not necessary) by our ISR revalidation request.

It replaces patchAsyncStorage.

Can be removed once this gets merged : vercel/next.js#72082

This PR depends on #781. Should not be merged before it

Copy link

changeset-bot bot commented Mar 18, 2025

🦋 Changeset detected

Latest commit: 4d89e34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@conico974 conico974 force-pushed the fix/fetch-cache-isr branch from e05f6d9 to b871648 Compare March 19, 2025 16:23
Base automatically changed from feat/code-patching to main March 20, 2025 09:01
@conico974 conico974 force-pushed the fix/fetch-cache-isr branch from bb3045e to 77451aa Compare March 20, 2025 09:11
Copy link

pkg-pr-new bot commented Mar 20, 2025

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@783

commit: 4d89e34

Copy link
Contributor

github-actions bot commented Mar 20, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 26.2% 2354 / 8983
🔵 Statements 26.2% 2354 / 8983
🔵 Functions 52.71% 126 / 239
🔵 Branches 73.25% 589 / 804
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/build/createServerBundle.ts 0% 0% 0% 0% 1-362
packages/open-next/src/build/patch/patchFetchCacheISR.ts 100% 100% 100% 100%
packages/open-next/src/core/requestHandler.ts 0% 0% 0% 0% 1-301
Generated in workflow #1082 for commit 4d89e34 by the Vitest Coverage Report Action

@vicb
Copy link
Contributor

vicb commented Mar 20, 2025

It replaces patchAsyncStorage.

Should patchAsyncStorage be removed in this PR then?

@conico974
Copy link
Contributor Author

Should patchAsyncStorage be removed in this PR then?

The unstable_cache is for next 14.2+, ideally i'd keep patchAsyncStorage for earlier versions.
I can remove it for Next 14.2+ with the esbuild plugin ? I guess that's fine for you guys

@conico974 conico974 force-pushed the fix/fetch-cache-isr branch from 77451aa to 9e6f1d0 Compare March 20, 2025 12:11
@conico974 conico974 merged commit 652550f into main Mar 20, 2025
3 checks passed
@conico974 conico974 deleted the fix/fetch-cache-isr branch March 20, 2025 12:52
@github-actions github-actions bot mentioned this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants