-
Notifications
You must be signed in to change notification settings - Fork 822
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
Normalize all RequestWrapper lifecycle methods to return a Promise<*> #709
Comments
I was about to ask about the use-case, but you have that covered :) Making this change in the next major release SGTM. |
Should we make this consistent across all plugins, i.e. they all return a Promise? |
That would probably future proof everything, yes. |
👍 Agree with going down this route for consistency sake. Do we need a separate issue for tracking doing this or did you want to reuse the same issue for it? |
Reuse this one. |
This was fixed in #736 |
Library Affected:
workbox-runtime-caching
The method signature for the public
cacheWillMatch()
interface is for it to return aResponse
, but there are use cases in which it would be ideal to perform some asynchronous operation prior to returning that response. In the next major release, we should change the interface to return aPromise<Response>
instead.The concrete use case for this is to perform an IndexedDB lookup prior to returning a response, which would have come in handy when fixing #691
The text was updated successfully, but these errors were encountered: