我正在构建一个 next.js (10.2) 应用程序, 当我在 dev 中运行应用程序时。模式,它正在积极缓存服务器端代码。
重现:
export const getStaticProps = async ({ params }) => {
return await api.get('test'); // This part of changes requires a page refresh.
}
function Home() {
return <div></div>
}
如果我将 await api.get('test');
更改为 await api.get('test2');
,我必须刷新浏览器。
是否可以在开发模式下配置此缓存策略?