-
-
Notifications
You must be signed in to change notification settings - Fork 293
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 caching with failed requests #437
Conversation
Unfortunately I can't correctly update the fixtures, since I get this issue:
Any hints what might cause this? |
my PR is fixing the issue. offline-plugin is depending on UglifyJSPlugin while webpack has switched to TerserPlugin instead in latest version, so offline-plugin doesn't get UglifyJsPlugin. #436 |
Ah, great that you have already taken control of the TerserPlugin. Thanks for letting me know! |
I've made a review to the above-mentioned PR, thanks for submitting @Bobgy |
@Thomas88 this looks great, do you think we should consolidate this to a function and re-use it? Not too sure, since we would have to pass both responses and requests to it.. Not too pretty, but having to update this code in 7 places the next time it's needed is not nice either, opinions? |
Thanks for the fast review @GGAlanSmithee :) I'm not sure if I quite understand the issue. Only code I have updated is in |
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.
Looks good, thanks for the contribution.
Perfect nvm :) Will update once #436 is merged to master. |
@GGAlanSmithee Thanks for the heads up. I've just merged the current master and there still seem to be some issues in CI. I will investigate later today. |
All fixtures are correctly updated now and tests are passing. Thus ready to merge from my side. Should I squash the commits to a single one @GGAlanSmithee? |
@NekR Would be really great to have your feedback on this. Don't want to push, just a small reminder that this needs qualified eyes to look over. |
Hi @Thomas88. Sorry for a delay. I'll take a look 👍 |
This seems to be mutation the original assets array which is used for other purposes too and may cause other bugs, but I'm going to merge this and I'll fix that by copying the array in Thank you contributing this, @Thomas88. It's very much appreciated. And sorry again for delay. |
@GGAlanSmithee thank you too for maintaining this and taking care of |
From my understanding, this doesn't fix the user's SW corrupted cache, is that correct? |
I've been investigating an issue where users can't access our site. It seems they have sporadic network failures and thus the loading of a chunk fails. Successful responses of other requests in the same cache will now be associated with the wrong request, since the the failed responses are filtered out, but the associated requests are not. For example if the loading of chunk 3 fails, the response of chunk 4 will now be associated with the request of chunk 3. In this pull request I now filter out the associated requests as well.