// Since this is the root layout, all fetch requests in the app// that don't set their own cache option will be cached.exportconstfetchCache='default-cache'exportdefaultasyncfunctionRootLayout() {consta=awaitfetch('https://...') // Cachedconstb=awaitfetch('https://...', { cache:'no-store' }) // Not cached// ...}
路由处理程序路由处理程序 中不再默认缓存。要选择将 GET 方法缓存,您可以在路由处理程序文件中使用 路由配置选项,例如 export const dynamic = 'force-static'。