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

docs(service-worker): add staleWhileRevalidate strategy #37301

Closed
wants to merge 1 commit into from

Conversation

ajitsinghkaler
Copy link
Contributor

There is great workaround for implementing staleWhileRevalidate strategy in service-worker by setting strategy to freshness and timeout to 0u. Documented this in service worker config where all other strategies are documented

Fixes #20402

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

NO staleWhileRevalidate strategy in service worker

Issue Number: #20402

What is the new behavior?

Added staleWhileRevalidate strategy in service worker

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from gkalpak May 27, 2020 02:34
@ngbot ngbot bot added this to the needsTriage milestone Jun 3, 2020
@gkalpak gkalpak added area: service-worker Issues related to the @angular/service-worker package action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release feature Issue that requests a new feature aio: preview labels Jun 5, 2020
@mary-poppins
Copy link

You can preview b4b6f67 at https://pr37301-b4b6f67.ngbuilds.io/.

Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Thx, @ajitsinghkaler
I made some suggestions wrt wording (and some extra details). Otherwise, I think this is a nice addition 👌

aio/content/guide/service-worker-config.md Outdated Show resolved Hide resolved
aio/content/guide/service-worker-config.md Outdated Show resolved Hide resolved
@googlebot
Copy link

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

There is great workaround for implementing staleWhileRevalidate strategy in service-worker by setting strategy to freshness and timeout to 0u. Documented this in service worker config where all other strategies are documented

Fixes angular#20402
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Jun 6, 2020
@mary-poppins
Copy link

You can preview c8fef55 at https://pr37301-c8fef55.ngbuilds.io/.

@ajitsinghkaler
Copy link
Contributor Author

@gkalpak made the changes. Please have a look.

Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

LGTM ✨
Thx, @ajitsinghkaler 👍

atscott pushed a commit that referenced this pull request Jun 8, 2020
There is great workaround for implementing staleWhileRevalidate strategy in service-worker by setting strategy to freshness and timeout to 0u. Documented this in service worker config where all other strategies are documented

Fixes #20402

PR Close #37301
@atscott atscott closed this in db11a0d Jun 8, 2020
@ajitsinghkaler ajitsinghkaler deleted the service-worker branch June 9, 2020 03:22
ngwattcos pushed a commit to ngwattcos/angular that referenced this pull request Jun 25, 2020
There is great workaround for implementing staleWhileRevalidate strategy in service-worker by setting strategy to freshness and timeout to 0u. Documented this in service worker config where all other strategies are documented

Fixes angular#20402

PR Close angular#37301
@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 Jul 10, 2020
profanis pushed a commit to profanis/angular that referenced this pull request Sep 5, 2020
There is great workaround for implementing staleWhileRevalidate strategy in service-worker by setting strategy to freshness and timeout to 0u. Documented this in service worker config where all other strategies are documented

Fixes angular#20402

PR Close angular#37301
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 aio: preview area: service-worker Issues related to the @angular/service-worker package cla: yes feature Issue that requests a new feature target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(service-worker): add staleWhileRevalidate strategy
5 participants