arash16 / nuxt-ssr-cache

Cache middleware for nuxt's SSR rendering.
MIT License
295 stars 64 forks source link

Can this work for client side? #9

Closed Bleuzen closed 5 years ago

Bleuzen commented 5 years ago

Hi, this is already a good start point, thanks for this middleware. But I would be even more happy if this could be used to display prerendered/cached pages on the client. Because at the moment I have one page which displays a lot of data and needs massive api calls. I'm using nuxt-ssr-cache to not hurt the api that much, by caching the site and only reload data / rerender every 30 minutes. This works if the user goes directly to the page (server side rendered). But if the client goes on front page first and lands through a nuxt-link on that page, the api calls are made again from client side. Do you know if it is possible to also cache in this case?