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

cacheExpiration on the runtime cache - should we prevent? #1014

Closed
gauntface opened this issue Nov 8, 2017 · 1 comment
Closed

cacheExpiration on the runtime cache - should we prevent? #1014

gauntface opened this issue Nov 8, 2017 · 1 comment
Labels
Breaking Change Denotes a "major" semver change. workbox-expiration

Comments

@gauntface
Copy link

At the moment this is valid:

workbox.routing.registerRoute(/\/images\//, workbox.strategies.cacheFirst({
  cacheExpiration: {
    maxEntries: 4
  }
}));

Reading this code for the first time you'd expect the rule to only apply to images, but that's not the case, it applies to all of the runtime cache. Should we require developers to specify a cache to enforce this behavior?

@jeffposnick
Copy link
Contributor

Yup, we should require that. If we didn't in v2 that was an oversight that we should fix in v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Denotes a "major" semver change. workbox-expiration
Projects
None yet
Development

No branches or pull requests

2 participants