fix: bypass Data Cache on live park/ride pages so navigation shows fresh data
The ride detail and park pages fetched with `next: { revalidate: 60 }`,
which is stale-while-revalidate. After hours of no traffic the Data Cache
held a morning snapshot; the first click served that stale value and only
the second request (e.g. a browser refresh) got the just-revalidated
payload. The endpoint also bundles live state with chart history, so one
stale fetch made the whole page wrong.
Switch the live-data fetches to `cache: "no-store"`. The calendar-month
fetch keeps its 5-min ISR since operating hours change slowly.
This commit is contained in:
@@ -73,7 +73,7 @@ export default async function ParkPage({ params, searchParams }: PageProps) {
|
||||
),
|
||||
apiFetch<RidesResponse>(
|
||||
`/api/parks/${id}/rides`,
|
||||
{ revalidate: 60 },
|
||||
{ noStore: true },
|
||||
),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user