-
-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt: caching routes runtime #579
Comments
Here you can check an example vite-pwa/nuxt#66 , check also linked issues at bottom. The problem about using runtime caching, you cannot create the cache when intercepting the request, the routes will be cached on second visit once the cache is created. |
Hi @userquin, Sorry to bother, but I cannot manage also to cache static external API ressources witn runtimeCache / urlPattern strategy. Here is my configuration:
I found also your post here: vite-pwa/nuxt#22 What is strange, is that the regex is OK when launched with yarn dev:
But as soon as I generate a static build for deployment (yarn clean && yarn generate && yarn preview):
Like if the regex did not match this time. The content is served currently for my tests from http://localhost:3000 Am I doing something wrong? Is it a limitation or bug in PWA module? |
it is a limitation in workbox, try reopening the browser and request the pdf file again (should be added to the cache), if you request the pdf again, it should be served from cache. |
I thought the default behavior would be that all routes was cached as the user visited them. I guess it's not because it seems no routes are cached at all not even the root.
Is that in workbox.runtimeCaching I need to set that up?…and would that be something like?
The text was updated successfully, but these errors were encountered: