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 unstable_cache

Steven Tey734f48c0cc9c
diff --git a/app/ui/home/testimonials.tsx b/app/ui/home/testimonials.tsx
index e968603b6b..6e15c09ce8 100644
--- a/app/ui/home/testimonials.tsx
+++ b/app/ui/home/testimonials.tsx
@@ -1,3 +1,4 @@
+import { unstable_cache } from "next/cache";
import prisma from "@/lib/prisma";
import { nFormatter } from "@/lib/utils";
import getTweetsMetadata, { homepageTweets } from "#/lib/twitter";
@@ -6,7 +7,15 @@ import Tweet from "#/ui/tweet";
import TestimonialsMobile from "./testimonials-mobile";
export default async function Testimonials() {
- const userCount = await prisma.user.count();
+ const userCount = await unstable_cache(
+ async () => {
+ return prisma.user.count();
+ },
+ [],
+ {
+ revalidate: 300,
+ },
+ )();
const tweets = await getTweetsMetadata(homepageTweets);
return (