diff --git a/starters/basic-starter/app/[...slug]/page.tsx b/starters/basic-starter/app/[...slug]/page.tsx index 4e61889cb..52b0189a6 100644 --- a/starters/basic-starter/app/[...slug]/page.tsx +++ b/starters/basic-starter/app/[...slug]/page.tsx @@ -27,6 +27,7 @@ async function getNode(slug: string[]) { const type = translatedPath.jsonapi?.resourceName! const uuid = translatedPath.entity.uuid + const tag = `${translatedPath.entity.type}:${translatedPath.entity.id}` if (type === "node--article") { params.include = "field_image,uid" @@ -34,6 +35,11 @@ async function getNode(slug: string[]) { const resource = await drupal.getResource(type, uuid, { params, + next: { + revalidate: 3600, + // Replace `revalidate` with `tags` if using tag based revalidation. + // tags: [tag], + }, }) if (!resource) { diff --git a/starters/basic-starter/app/page.tsx b/starters/basic-starter/app/page.tsx index 01aaac5aa..a3ded1598 100644 --- a/starters/basic-starter/app/page.tsx +++ b/starters/basic-starter/app/page.tsx @@ -17,6 +17,9 @@ export default async function Home() { include: "field_image,uid", sort: "-created", }, + next: { + revalidate: 3600, + }, } )