From 4c76f16f2cb4b32526623160657d42c16fe09d00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 16:56:38 +0000 Subject: [PATCH] perf(vercel): optimize resource limits (active CPU, function invocations, data cache reads) --- app/[locale]/docs/[...slug]/page.tsx | 2 +- app/[locale]/feed/page.tsx | 3 +++ app/[locale]/share/page.tsx | 2 ++ app/[locale]/u/[username]/posts/page.tsx | 1 + app/[locale]/u/[username]/shares/page.tsx | 1 + app/components/Footer.tsx | 4 ++++ app/components/Header.tsx | 1 + proxy.ts | 2 ++ 8 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/[locale]/docs/[...slug]/page.tsx b/app/[locale]/docs/[...slug]/page.tsx index 5e9b25f5..49fbc004 100644 --- a/app/[locale]/docs/[...slug]/page.tsx +++ b/app/[locale]/docs/[...slug]/page.tsx @@ -46,7 +46,7 @@ async function resolveDocPath( { redirect: "manual", signal: controller.signal, - cache: "no-store", + next: { revalidate: 300 }, // 缓存 5 分钟,防止 bot 扫描频繁触发冷启动与后端查询 // 显式 UA:Vercel SSR 默认出口 UA 可能被 CF bot filter 拦(对齐 feed/page fetchLinks) headers: { accept: "application/json", diff --git a/app/[locale]/feed/page.tsx b/app/[locale]/feed/page.tsx index 83110bae..e330eefc 100644 --- a/app/[locale]/feed/page.tsx +++ b/app/[locale]/feed/page.tsx @@ -245,6 +245,7 @@ export default async function FeedPage({ searchParams }: FeedPageProps) { {tab === "links" ? ( + 丢个链接 @@ -252,6 +253,7 @@ export default async function FeedPage({ searchParams }: FeedPageProps) { ) : ( + 写篇文章 @@ -292,6 +294,7 @@ export default async function FeedPage({ searchParams }: FeedPageProps) {
开始写 → diff --git a/app/[locale]/share/page.tsx b/app/[locale]/share/page.tsx index 49381d47..d203e205 100644 --- a/app/[locale]/share/page.tsx +++ b/app/[locale]/share/page.tsx @@ -147,6 +147,7 @@ function ShareInner() { 去看看大家分享了啥 → @@ -226,6 +227,7 @@ function ShareInner() {还没有发布过文章,写第一篇让大家看到你。
去写 → diff --git a/app/[locale]/u/[username]/shares/page.tsx b/app/[locale]/u/[username]/shares/page.tsx index a613aa18..ec81474e 100644 --- a/app/[locale]/u/[username]/shares/page.tsx +++ b/app/[locale]/u/[username]/shares/page.tsx @@ -103,6 +103,7 @@ export default function SharesPage({ params }: PageProps) {这是 {username} 的私有分享列表,只有本人登录后可见。
浏览公共分享墙 → diff --git a/app/components/Footer.tsx b/app/components/Footer.tsx index b772a6f0..a11cb875 100644 --- a/app/components/Footer.tsx +++ b/app/components/Footer.tsx @@ -64,6 +64,7 @@ export async function Footer() {