Skip to content

Open-source status page, incident response and uptime monitoring

🥅 add cache (#538)

Thibault Le Ouay2b1bbebacc13
diff --git a/apps/web/src/app/status-page/[domain]/page.tsx b/apps/web/src/app/status-page/[domain]/page.tsx
index 3590ad059..3438cdc8b 100644
--- a/apps/web/src/app/status-page/[domain]/page.tsx
+++ b/apps/web/src/app/status-page/[domain]/page.tsx
@@ -26,7 +26,7 @@ type Props = {
searchParams: { [key: string]: string | string[] | undefined };
};
-export const dynamic = "force-dynamic";
+export const revalidate = "600";
export default async function Page({ params }: Props) {
const page = await api.page.getPageBySlug.query({ slug: params.domain });
diff --git a/packages/tinybird/src/client.ts b/packages/tinybird/src/client.ts
index f49feacd6..4e9675881 100644
--- a/packages/tinybird/src/client.ts
+++ b/packages/tinybird/src/client.ts
@@ -25,7 +25,7 @@ export function getResponseList(tb: Tinybird) {
data: tbBuildResponseList,
opts: {
// cache: "no-store",
- revalidate: 30, // 30 seconds cache
+ revalidate: 600, // 10 min cache
},
});
}
@@ -37,7 +37,7 @@ export function getMonitorList(tb: Tinybird) {
data: tbBuildMonitorList,
opts: {
// cache: "no-store",
- revalidate: 300, // 5 min cache
+ revalidate: 600, // 10 min cache
},
});
}