diff --git a/src/app/(storefront)/products/page.tsx b/src/app/(storefront)/products/page.tsx index 9aa8539..fc5ee79 100644 --- a/src/app/(storefront)/products/page.tsx +++ b/src/app/(storefront)/products/page.tsx @@ -15,6 +15,7 @@ async function fetchProducts() { 'Content-Type': 'application/json', 'x-publishable-api-key': process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY as string, }, + next: { revalidate: 0 }, }); if (!response.ok) { diff --git a/src/lib/instagram.ts b/src/lib/instagram.ts index d7639fb..297dd82 100644 --- a/src/lib/instagram.ts +++ b/src/lib/instagram.ts @@ -13,7 +13,7 @@ export async function fetchInstagramPosts(): Promise { // const url = `https://graph.instagram.com/me/media?fields=id,caption,media_type,media_url,thumbnail_url,permalink&access_token=${accessToken}`; const url = `https://graph.instagram.com/me/media?fields=id,caption,media_type,media_url,thumbnail_url,permalink&access_token=${accessToken}`; - const res = await fetch(url); + const res = await fetch(url, { next: { revalidate: 30 * 60 } }); const data = await res.json(); if (data?.data) {