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
fix(service-worker): clear service worker cache in safety worker #43324
fix(service-worker): clear service worker cache in safety worker #43324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, @naveedahmed1 👍
I've left a couple of suggestions. Could you also mention the change in the Safety Worker section of Service worker in production guide? 🙏
Thanks @gkalpak I have incorporated the changes you suggested. I hope everything is in order now :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for making the changes, @naveedahmed1 👍
I have left a couple of small suggestions regarding the docs. Can you also please ensure that there is only a single commit on the PR (since this is conceptually a single change) 🙏
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, @naveedahmed1 👍
It looks good to me, except I still see 5 commits on the PR: https://github.com/angular/angular/pull/43324/commits
Can you please make sure there is only a single commit?
clear angular service worker cache in safety worker to ensure stale or broken contents are not served in future requests Fixes #43163
…ular#43324) clear angular service worker cache in safety worker to ensure stale or broken contents are not served in future requests Fixes angular#43163 PR Close angular#43324
…ular#43324) clear angular service worker cache in safety worker to ensure stale or broken contents are not served in future requests Fixes angular#43163 PR Close angular#43324
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
clear angular service worker cache in safety worker to ensure stale
or broken contents are not served in future requests
Fixes #43163
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, safety worker only unregisters old service worker, while leaving the service worker cache. This creates problem when cache contains broken contents and sometimes causes new service worker to serve the contents from the old cache. Hence failing the purpose of safety worker.
Issue Number: 43163
What is the new behavior?
After unregistering old service worker, clear cache of angular service worker. This ensure that the new service worker doesn't serve stale or broken contents.
Does this PR introduce a breaking change?