diff --git a/src/app/components/RecentEdits.tsx b/src/app/components/RecentEdits.tsx index f8cf8f061..dc1b3ed0d 100644 --- a/src/app/components/RecentEdits.tsx +++ b/src/app/components/RecentEdits.tsx @@ -4,11 +4,6 @@ import { ArrowRightIcon } from '@heroicons/react/24/outline' import { getChangeHistoryServerSide } from '@/js/graphql/contribAPI' import { ChangesetCard } from '@/components/edit/RecentChangeHistory' -/** - * Cache time in seconds - */ -export const revalidate = 300 - /** * Show most recent edits */ diff --git a/src/app/components/RecentTags.tsx b/src/app/components/RecentTags.tsx index c337553ab..b7733f544 100644 --- a/src/app/components/RecentTags.tsx +++ b/src/app/components/RecentTags.tsx @@ -1,11 +1,6 @@ import { RecentImageCard } from '@/components/home/RecentMediaCard' import { getMediaForFeed } from '@/js/graphql/api' -/** - * Cache time in seconds - */ -export const revalidate = 300 - /** * Horizontal gallery of recent images with tags */ diff --git a/src/app/page.tsx b/src/app/page.tsx index 77f94af73..b61c8e921 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -5,6 +5,11 @@ import { RecentEdits, RecentEditsSkeleton } from './components/RecentEdits' import { RecentTags } from './components/RecentTags' import { USAToC } from './components/USAToC' +/** + * Cache duration in seconds + */ +export const revalidate = 300 + /** * Root home page */ diff --git a/src/js/graphql/api.ts b/src/js/graphql/api.ts index 125d0f87f..2384de367 100644 --- a/src/js/graphql/api.ts +++ b/src/js/graphql/api.ts @@ -92,7 +92,7 @@ export const getMediaForFeed = async (maxUsers: number, maxFiles: number): Promi maxUsers, maxFiles }, - notifyOnNetworkStatusChange: true + fetchPolicy: 'network-only' }) if (Array.isArray(rs.data?.getMediaForFeed)) {