Skip to content

Commit

Permalink
refactor: set nextjs cache to 12hrs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshift committed Nov 5, 2024
1 parent ddc49ef commit e223735
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shared/utils/mw-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e223735

Please sign in to comment.