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

fix(service-worker): clean up caches from old SW versions #26319

Closed
wants to merge 1 commit into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Oct 9, 2018

PR Checklist

PR Type

[x] Bugfix

What is the current behavior?

Installing a recent version of @angular/service-worker, leaves caches created by an old version (e.g. beta) behind. This can lead to exceeding the storage quota limitations imposed by browsers.

Issue Number: N/A

What is the new behavior?

On activate, the SW will schedule the removal of caches left behind by older versions. Since the SW immediately takes over all clients, it is safe to delete caches used by older (e.g. beta) @angular/service-worker versions to avoid running into browser storage quota limitations.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Since the SW immediately takes over all clients, it is safe to delete
caches used by older (e.g. beta) `@angular/service-worker` versions to
avoid running into browser storage quota limitations.
@gkalpak gkalpak added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release area: service-worker Issues related to the @angular/service-worker package labels Oct 9, 2018
@gkalpak gkalpak requested a review from alxhub October 9, 2018 12:10
@mary-poppins
Copy link

You can preview 1a42c3f at https://pr26319-1a42c3f.ngbuilds.io/.

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! thanks

@IgorMinar IgorMinar removed the request for review from alxhub October 16, 2018 05:26
@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 16, 2018
@ngbot
Copy link

ngbot bot commented Oct 16, 2018

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "continuous-integration/travis-ci/pr" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@IgorMinar IgorMinar added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 16, 2018
@IgorMinar
Copy link
Contributor

caretaker notes: ci flakes

@mhevery mhevery closed this in 2326b9c Oct 16, 2018
mhevery pushed a commit that referenced this pull request Oct 16, 2018
Since the SW immediately takes over all clients, it is safe to delete
caches used by older (e.g. beta) `@angular/service-worker` versions to
avoid running into browser storage quota limitations.

PR Close #26319
@gkalpak gkalpak deleted the fix-sw-clean-old-caches branch October 16, 2018 21:56
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
)

Since the SW immediately takes over all clients, it is safe to delete
caches used by older (e.g. beta) `@angular/service-worker` versions to
avoid running into browser storage quota limitations.

PR Close angular#26319
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: service-worker Issues related to the @angular/service-worker package cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants