Skip to content
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

Keeps caching same resources? #160

Open
1 of 3 tasks
nealoke opened this issue Nov 12, 2018 · 0 comments
Open
1 of 3 tasks

Keeps caching same resources? #160

nealoke opened this issue Nov 12, 2018 · 0 comments

Comments

@nealoke
Copy link

nealoke commented Nov 12, 2018

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?

caching

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?.*/
        }
    ]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant