essay-org / essay

personalise blog system
MIT License
951 stars 277 forks source link

如何获取/缓存 nuxt.render的渲染结果 #32

Closed chesscai closed 6 years ago

chesscai commented 6 years ago

Hello.请问: 使用 lru-cache 缓存页面与组件, 如何拿到类似 renderToString 的 html 缓存起来? 在koa中:

app.use(async (ctx, next) => {
  ...
  nuxt.render(ctx.req, ctx.res, promise => {
    // 测试结果:回调始终不执行
  })
})
wmui commented 6 years ago

很抱歉,我没这么使用过,所以不清楚如何解决。或许你可以到nuxt官方开一个issues