From 446512640fcffd1a393e50e96e84aaed7bb133d3 Mon Sep 17 00:00:00 2001 From: Sam Der Date: Thu, 5 Oct 2023 11:58:20 -0700 Subject: [PATCH 1/2] fix: cache revalidation time of 60s --- apps/site/src/views/Home/sections/FAQ/getQuestions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/site/src/views/Home/sections/FAQ/getQuestions.ts b/apps/site/src/views/Home/sections/FAQ/getQuestions.ts index 455d140f..d8aa6145 100644 --- a/apps/site/src/views/Home/sections/FAQ/getQuestions.ts +++ b/apps/site/src/views/Home/sections/FAQ/getQuestions.ts @@ -30,6 +30,8 @@ const Questions = z.array( }) ); +export const revalidate = 60; + export const getQuestions = cache(async () => { return Questions.parse( await client.fetch( From 181349aafa7d9486cd7493aa0affb304a4054434 Mon Sep 17 00:00:00 2001 From: Sam Der Date: Thu, 5 Oct 2023 12:15:33 -0700 Subject: [PATCH 2/2] fix: move revalidate to page.tsx --- apps/site/src/app/page.tsx | 2 ++ apps/site/src/views/Home/sections/FAQ/getQuestions.ts | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/site/src/app/page.tsx b/apps/site/src/app/page.tsx index 89bed305..1a9f8b98 100644 --- a/apps/site/src/app/page.tsx +++ b/apps/site/src/app/page.tsx @@ -1 +1,3 @@ +export const revalidate = 60; + export { Home as default } from "@/views"; diff --git a/apps/site/src/views/Home/sections/FAQ/getQuestions.ts b/apps/site/src/views/Home/sections/FAQ/getQuestions.ts index d8aa6145..a3e15f00 100644 --- a/apps/site/src/views/Home/sections/FAQ/getQuestions.ts +++ b/apps/site/src/views/Home/sections/FAQ/getQuestions.ts @@ -30,7 +30,6 @@ const Questions = z.array( }) ); -export const revalidate = 60; export const getQuestions = cache(async () => { return Questions.parse(