From e2237352f7f95009f559d7b9cb6bd75917decafc Mon Sep 17 00:00:00 2001 From: John Ballesteros <johnshift.dev@gmail.com> Date: Tue, 5 Nov 2024 20:00:52 +0800 Subject: [PATCH] refactor: set nextjs cache to 12hrs --- src/shared/utils/mw-get.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/utils/mw-get.ts b/src/shared/utils/mw-get.ts index aa3ced8a..8ada47e6 100644 --- a/src/shared/utils/mw-get.ts +++ b/src/shared/utils/mw-get.ts @@ -23,7 +23,9 @@ export const mwGET = async <T extends z.ZodTypeAny>(props: Props<T>) => { const res = await fetch(url, { method: 'GET', ...options, - cache: 'no-store', + next: { + revalidate: 43200, // 12 hours + }, }); if (!res.ok) {