Skip to content

fix: use route cache revalidation - #232

Merged
AyronK merged 1 commit into
fortedigital:masterfrom
tomatotomata:codex/fix-app-route-revalidate-224
Aug 6, 2026
Merged

fix: use route cache revalidation#232
AyronK merged 1 commit into
fortedigital:masterfrom
tomatotomata:codex/fix-app-route-revalidate-224

Conversation

@tomatotomata

Copy link
Copy Markdown
Contributor

Summary

  • use cacheControl.revalidate for APP_ROUTE cache entries
  • add focused regression coverage for route entries, existing app pages, and fallback behavior

This fixes route handlers falling back to the default stale age when Next.js provides the route-level value through cacheControl.

Validation

  • git diff --check
  • Added Jest coverage in resolveRevalidateValue.test.ts

The package dependencies are not installed in this sparse checkout. The package Jest command timed out while the pnpm runtime attempted workspace dependency resolution, so I could not claim a local test pass. The upstream checks should run the full package suite.

The implementation was prepared with AI assistance and reviewed by me. I am responsible for the changes and this submission.

Closes #224

Signed-off-by: ahmadalguydi <ahmadalgaidy@hotmail.com>
@AyronK

AyronK commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

This also addresses #231 right?

@tomatotomata

Copy link
Copy Markdown
Contributor Author

I checked #231 against the current branch. This PR fixes the shared resolveRevalidateValue() path, so APP_ROUTE no longer falls back to the long default revalidation window. It does not change the separate tag derivation in set(), so it does not by itself fix revalidatePath() matching empty tags. I kept that second behavior out of this PR to stay aligned with #224; if you want the two fixes combined, I can extend the scope.

@AyronK
AyronK merged commit a015559 into fortedigital:master Aug 6, 2026
2 checks passed
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.

The resolveRevalidateValue helper doesn't handle APP_ROUTE case

2 participants