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

Rename cacheWillMatch lifecycle method #713

Closed
jeffposnick opened this issue Aug 2, 2017 · 3 comments
Closed

Rename cacheWillMatch lifecycle method #713

jeffposnick opened this issue Aug 2, 2017 · 3 comments
Assignees
Labels
Breaking Change Denotes a "major" semver change.

Comments

@jeffposnick
Copy link
Contributor

Library Affected:
workbox-runtime-caching

There's currently a lifecycle method triggered by RequestWrapper.match() called cacheWillMatch(), which gives a plugin the opportunity to inspect the cached response that would normally be returned for a given request, and either return null if the cached response isn't valid (because it's expired, for instance) or return an alternative response instead (like a 206 Partial Content version of it).

There's been some internal discussion about renaming this method in the next major semver release, with cachedResponseWillBeUsed() as the current leading candidate. If folks have alternative suggestions, add them here.

@jeffposnick jeffposnick added the Breaking Change Denotes a "major" semver change. label Aug 2, 2017
@jeffposnick jeffposnick self-assigned this Aug 2, 2017
@gauntface
Copy link

Let's get this in for V2 - everyone seems in favor of this and no complaints found in meeting.

@addyosmani
Copy link
Member

cachedResponseWillBeUsed() as the current leading candidate

To echo internal support for it, 👍. SG to move ahead with it for v2.

@jeffposnick
Copy link
Contributor Author

I'd like to get #710 merged to v2 first, and then I'll handle this renaming, since that open PR still using the cacheWillMatch() lifecycle name.

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.
Projects
None yet
Development

No branches or pull requests

3 participants