essay-org / essay

personalise blog system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

chesscai opened this issue · comments

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

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

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