Skip to content

feat(web): add ISR with Strapi webhook on-demand revalidation#498

Open
Kneesal wants to merge 3 commits intoJesusFilm:mainfrom
Kneesal:feat/497-isr-webhook-revalidation
Open

feat(web): add ISR with Strapi webhook on-demand revalidation#498
Kneesal wants to merge 3 commits intoJesusFilm:mainfrom
Kneesal:feat/497-isr-webhook-revalidation

Conversation

@Kneesal
Copy link
Member

@Kneesal Kneesal commented Mar 17, 2026

Summary

  • Enable the Next.js 16 "use cache" directive on readPublishedContent with cacheTag() and cacheLife("max") so Apollo GraphQL query results are cached across requests and invalidated on-demand
  • Upgrade the /api/revalidate route from revalidatePath to revalidateTag with Strapi webhook payload parsing for surgical per-slug cache invalidation
  • Add experimental.useCache: true to next.config.mjs and move typedRoutes to its new stable config location

Resolves #497

Contracts Changed

No

Regeneration Required

No

Validation

  • pnpm --filter @forge/web build passes with no type or lint errors
  • Homepage correctly marked as dynamic (ƒ) in build output
  • Revalidate route accepts Strapi webhook payloads with x-forge-revalidate-token auth

Made with Cursor

Kneesal and others added 3 commits February 19, 2026 10:29
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
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.

feat(web): add ISR with Strapi webhook on-demand revalidation

1 participant