feat(web): add ISR with Strapi webhook on-demand revalidation#498
Open
Kneesal wants to merge 3 commits intoJesusFilm:mainfrom
Open
feat(web): add ISR with Strapi webhook on-demand revalidation#498Kneesal wants to merge 3 commits intoJesusFilm:mainfrom
Kneesal wants to merge 3 commits intoJesusFilm:mainfrom
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Enable the "use cache" directive on readPublishedContent with cacheTag
and cacheLife("max") so Apollo query results are cached across requests.
Upgrade the /api/revalidate route from revalidatePath to revalidateTag
with Strapi webhook payload parsing for surgical cache invalidation.
Resolves JesusFilm#497
Made-with: Cursor
The try/catch in readPublishedContent handles build-time errors gracefully, so force-dynamic is unnecessary and would prevent the page from being statically cached. Made-with: Cursor
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.
Summary
"use cache"directive onreadPublishedContentwithcacheTag()andcacheLife("max")so Apollo GraphQL query results are cached across requests and invalidated on-demand/api/revalidateroute fromrevalidatePathtorevalidateTagwith Strapi webhook payload parsing for surgical per-slug cache invalidationexperimental.useCache: truetonext.config.mjsand movetypedRoutesto its new stable config locationResolves #497
Contracts Changed
No
Regeneration Required
No
Validation
pnpm --filter @forge/web buildpasses with no type or lint errorsƒ) in build outputx-forge-revalidate-tokenauthMade with Cursor