fix(ui): 击穿 Next.js 财务数据缓存,强制走势图与真实数据库快照实时对齐

This commit is contained in:
2026-05-02 20:57:39 +08:00
parent 3d0cfda981
commit 6520dcde72
4 changed files with 16 additions and 0 deletions
+5
View File
@@ -1,5 +1,6 @@
import { NextResponse } from 'next/server';
import { reconstructPortfolioHistory } from '@/actions/snapshots';
import { revalidatePath } from 'next/cache';
export const dynamic = 'force-dynamic';
export const runtime = 'nodejs';
@@ -30,6 +31,10 @@ export async function POST(req: Request) {
console.log('[Rebuild Snapshots] Rebuild complete:', result);
// 清除整个大盘页面的所有服务端缓存
revalidatePath('/', 'layout');
revalidatePath('/dashboard', 'page');
return NextResponse.json({
success: true,
message: '历史快照全量重建完成',