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

Delete (rather than just empty) temporary cache after activation #1735

Closed
jeffposnick opened this issue Oct 26, 2018 · 2 comments
Closed

Delete (rather than just empty) temporary cache after activation #1735

jeffposnick opened this issue Oct 26, 2018 · 2 comments
Assignees
Labels
Developer Experience Related to ease of use for developers. Documentation Related to our docs. Good First Issue This would be an ideal issue for a new contributor to take on. workbox-precaching

Comments

@jeffposnick
Copy link
Contributor

Library Affected:
workbox-precaching

Since Workbox v3, workbox-precaching has been creating a temporary cache that's populated during the install phase, and cleared out during the activate phase. (See #1316.) Following a successful activation, the temporary cache has no entries in it, but the named Cache itself isn't deleted, so it shows up as empty in the cache storage debug tools, and can cause developer confusion.

We might as well delete it following activation, just to prevent that confusion. The cost of recreating the Cache should be negligible.

@jeffposnick jeffposnick added Developer Experience Related to ease of use for developers. workbox-precaching labels Oct 26, 2018
@jeffposnick jeffposnick self-assigned this Oct 26, 2018
@philipwalton
Copy link
Member

I agree we should delete it, and I also think it should be documented so that when users do encounter it, it's not a surprise.

@jadjoubran jadjoubran added Documentation Related to our docs. Good First Issue This would be an ideal issue for a new contributor to take on. labels Nov 26, 2018
@jeffposnick
Copy link
Contributor Author

...actually, no, I just dug into our issue history and found this #1372 which explains how things could go wrong if we did call delete().

I added the delete() to v4 in #1736 but I need to back that out in an upcoming PR, and I'm going to close this issue, as I don't think we can safely delete the cache after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Related to ease of use for developers. Documentation Related to our docs. Good First Issue This would be an ideal issue for a new contributor to take on. workbox-precaching
Projects
None yet
Development

No branches or pull requests

3 participants