-
Notifications
You must be signed in to change notification settings - Fork 514
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(cache): remove rejected cache promise from pending list. #995
Conversation
Codecov Report
@@ Coverage Diff @@
## main #995 +/- ##
==========================================
+ Coverage 67.67% 67.73% +0.06%
==========================================
Files 61 60 -1
Lines 6171 6133 -38
Branches 694 691 -3
==========================================
- Hits 4176 4154 -22
+ Misses 1985 1969 -16
Partials 10 10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@pi0 do you have time to review this change? It seems to me as quite a small fix for a very impactful problem. |
src/runtime/cache.ts
Outdated
} | ||
} catch (error) { | ||
// Make sure entries that reject get removed. | ||
delete pending[key]; |
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.
I think we could limit scope of try catch around L94 only.
Thanks for the PR dear @tdekoning and sorry took long to review. |
π Linked issue
nuxt/nuxt#18926
β Type of change
π Description
Resolved nuxt/nuxt#18926.
Cached events that have rejected were kept inside the
pending
list, causing later requests to the same event to reject as well. This led to events on the same path to never recover, because the code of the event was never called again after an error.π Checklist