Cache Components 秒开优化(Next.js)
io.github.vercel/next.js/next-cache-components-optimizer
在 Cache Components / PPR 下,为把 Next.js 路由做到即时导航设定 agent 循环,覆盖首次加载(hard navigation)与客户端导航(soft navigation)。把目标编码为一个失败的 @next/playwright instant() e2e 并逐路由跑绿;固化的测试随后可防回归。当需要让某路由导航即时(static shell 立即 commit)、修复 static shell 未被预渲染/服务/预取的路由、扩大 static shell 或修复首屏缓慢、诊断是哪个 Suspense boundary 让路由无法进入 static shell,或为某个路由编写 instant() e2e 守卫时使用。需要 Next.js 16.3+ 且启用 cacheComponents;版本过旧则先升级。