api cache

This commit is contained in:
Owen Rees
2023-06-14 16:40:33 +02:00
parent 2a6331fb56
commit f4b3d26b4f
5 changed files with 307 additions and 12 deletions
+2 -2
View File
@@ -4,6 +4,8 @@ import Layout from "@/components/Layout";
import TournamentTable from "@/components/TournamentTable";
import { dateOrderingFrance } from "@/utils/dbDateOrdering";
export const revalidate = 86400; // cache for 24 hours
/**
* Imports the tournament map component, ensuring CSR only.
* @remarks SSR is not supported by react-leaflet
@@ -17,8 +19,6 @@ const TournamentMap = dynamic(() => import("@/components/TournamentMap"), {
),
});
export const revalidate = 86400; // cache for 24 hours
const getTournaments = async () => {
try {
const client = await clientPromise;