From c3f79cea4db2eb8802cdf8d91a0d4d8096f1ac19 Mon Sep 17 00:00:00 2001 From: martines3000 Date: Fri, 7 Jun 2024 16:24:18 +0200 Subject: [PATCH] chore: maybe fixes caching issues --- packages/dapp/src/hooks/useQuota.ts | 2 +- packages/dapp/src/lib/airstack/getMinimalProfileFromAddress.ts | 2 +- .../dapp/src/lib/airstack/getMinimalProfileInfoByPlatform.ts | 2 +- packages/dapp/src/lib/airstack/getProfileInfo.ts | 2 +- packages/dapp/src/lib/ees/getTopEndorsersAndDonators.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dapp/src/hooks/useQuota.ts b/packages/dapp/src/hooks/useQuota.ts index c787212..e3313c3 100644 --- a/packages/dapp/src/hooks/useQuota.ts +++ b/packages/dapp/src/hooks/useQuota.ts @@ -29,6 +29,6 @@ export const useQuota = ({ return data; }, enabled, - refetchInterval: 1000 * 120, // Refetch every 2 minutes + refetchInterval: 120000, // Refetch every 2 minutes }); }; diff --git a/packages/dapp/src/lib/airstack/getMinimalProfileFromAddress.ts b/packages/dapp/src/lib/airstack/getMinimalProfileFromAddress.ts index d9eaabe..d969bd3 100644 --- a/packages/dapp/src/lib/airstack/getMinimalProfileFromAddress.ts +++ b/packages/dapp/src/lib/airstack/getMinimalProfileFromAddress.ts @@ -37,7 +37,7 @@ export const getMinimalProfileFromAddress = async ( identity: address, }, }), - next: { revalidate: 24 * 60 * 60 }, // Cache for 1 day + next: { revalidate: 86400 }, // Cache for 1 day }); // Check if request was successful diff --git a/packages/dapp/src/lib/airstack/getMinimalProfileInfoByPlatform.ts b/packages/dapp/src/lib/airstack/getMinimalProfileInfoByPlatform.ts index 9c5d19b..40dec8e 100644 --- a/packages/dapp/src/lib/airstack/getMinimalProfileInfoByPlatform.ts +++ b/packages/dapp/src/lib/airstack/getMinimalProfileInfoByPlatform.ts @@ -59,7 +59,7 @@ export const getMinimalProfileInfoByPlatform = async ( : identity, }, }), - next: { revalidate: 24 * 60 * 60 }, // Cache for 1 day + next: { revalidate: 86400 }, // Cache for 1 day }); // Check if request was successful diff --git a/packages/dapp/src/lib/airstack/getProfileInfo.ts b/packages/dapp/src/lib/airstack/getProfileInfo.ts index 5040c32..222c17e 100644 --- a/packages/dapp/src/lib/airstack/getProfileInfo.ts +++ b/packages/dapp/src/lib/airstack/getProfileInfo.ts @@ -25,7 +25,7 @@ export const getProfileInfo = async ( query: GetProfileInfoDocument, variables, }), - next: { revalidate: 24 * 60 * 60 }, // Cache for 1 day + next: { revalidate: 86400 }, // Cache for 1 day }); // Check if request was successful diff --git a/packages/dapp/src/lib/ees/getTopEndorsersAndDonators.ts b/packages/dapp/src/lib/ees/getTopEndorsersAndDonators.ts index dc67db2..accac70 100644 --- a/packages/dapp/src/lib/ees/getTopEndorsersAndDonators.ts +++ b/packages/dapp/src/lib/ees/getTopEndorsersAndDonators.ts @@ -32,7 +32,7 @@ export const getTopEndorsersAndDonators = async ({ }, }), // Cache for 1 minute - next: { revalidate: 60 }, + next: { revalidate: 86400 }, }); // Check if request was successful