Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

use ISR to reduce active CPU usage

Steven Teye091cd0be8c8
diff --git a/apps/web/app/[domain]/not-found/page.tsx b/apps/web/app/[domain]/not-found/page.tsx
index af61a30e94..b55531ca98 100644
--- a/apps/web/app/[domain]/not-found/page.tsx
+++ b/apps/web/app/[domain]/not-found/page.tsx
@@ -6,7 +6,7 @@ import { Hero } from "@/ui/placeholders/hero";
import { GlobeSearch } from "@dub/ui";
import { cn, constructMetadata, createHref } from "@dub/utils";
-export const runtime = "edge";
+export const revalidate = false; // cache indefinitely
export const metadata = constructMetadata({
title: "Link Not Found",
diff --git a/apps/web/app/[domain]/page.tsx b/apps/web/app/[domain]/page.tsx
index d6ecb4046a..29182bc1dd 100644
--- a/apps/web/app/[domain]/page.tsx
+++ b/apps/web/app/[domain]/page.tsx
@@ -1,7 +1,7 @@
import { constructMetadata } from "@dub/utils";
import PlaceholderContent from "./placeholder";
-export const runtime = "edge";
+export const revalidate = false; // cache indefinitely
export function generateMetadata({ params }: { params: { domain: string } }) {
const title = `${params.domain.toUpperCase()} - A ${
diff --git a/apps/web/app/proxy/[domain]/[key]/page.tsx b/apps/web/app/proxy/[domain]/[key]/page.tsx
index 1fa6966ac0..2b913f796f 100644
--- a/apps/web/app/proxy/[domain]/[key]/page.tsx
+++ b/apps/web/app/proxy/[domain]/[key]/page.tsx
@@ -8,7 +8,7 @@ import {
import { unescape } from "html-escaper";
import { notFound, redirect } from "next/navigation";
-export const runtime = "edge";
+export const revalidate = false; // cache indefinitely
export async function generateMetadata({
params,