我们有很少的页面和组件作为服务器端渲染。
我们尝试对少数 API 响应使用缓存。
export async function getServerSideProps(context) {
const res = await getRequest(API.home)
return {
props: {
"home": res?.data?.result
},
}
}
Run Code Online (Sandbox Code Playgroud)
Next.js 版本是 11.1。
有人可以建议我们如何实现缓存吗?