数据读取、缓存与重新验证
对比跨请求复用的数据与每次请求重新计算的数据。
01
跨请求缓存
公共文章数据可由所有访问者复用
Server Component → use cache → cacheTag("learning-posts")02
请求时渲染
请求到达后才生成当前值
Suspense → connection() → 每次请求执行读取请求时间…
对比跨请求复用的数据与每次请求重新计算的数据。
公共文章数据可由所有访问者复用
Server Component → use cache → cacheTag("learning-posts")请求到达后才生成当前值
Suspense → connection() → 每次请求执行读取请求时间…
本次请求时间: