Keeps caching same resources?
nealoke opened this issue · 0 comments
nealoke commented
BEFORE YOU SUBMIT please read the following:
- I'm submitting a bug report
- I'm submitting a feature request
- I'm submitting a support request
webpack version:
4.20.2
sw-precache-webpack-plugin version:
0.11.5
Please tell us about your environment:
Windows 10
Browser: Chrome 70
Current behavior:
When reloading the same page over and over it keeps adding to the cache with more then a few MB's. So after a user visits about 10 pages it's over 200MB. Is it normal that it keeps caching the same assets?
Expected/desired behavior:
Don't re-cache assets for a second time.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with your:
- Webpack configuration:
new SWPrecacheWebpackPlugin({
filepath: path.resolve("./static/service-worker.js"),
staticFileGlobs: ["static/**/*"],
minify: true,
staticFileGlobsIgnorePatterns: [/\.next\//],
runtimeCaching: [
{
handler: "fastest",
urlPattern: /[.](png|jpg|css)/
},
{
handler: "networkFirst",
urlPattern: /^https?.*/
}
]
})
- Generated service worker (not minified):
Gist of this