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

Cache: Fix CacheFirst + emitCacheMisses(true) #4708

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

martinbonnin
Copy link
Contributor

When using emitCacheMisses(true), the CacheFirst fetch policy was never going to the network and therefore could miss some events. This PR adds a test and a fix to continue to the network in case the first response is a cache miss.

A huuuuuuuge THANK YOU to @mateuszkwiecinski for all the investigations and to @lwasyl for locating the source of the issue. You rock!

PS: we're hoping to simplify the error handling in 4.x and remove the number of special cases in the interceptors (see this PR). Ping @BoD we should do a small RFC before we're committing to this change to gather community feedback.

Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

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

👍

@martinbonnin martinbonnin merged commit 1876c03 into release-3.x Feb 27, 2023
@martinbonnin martinbonnin deleted the cache-first-emit-cache-misses branch February 27, 2023 10:24
@martinbonnin
Copy link
Contributor Author

For the record the error handling RFC is here

@BoD
Copy link
Contributor

BoD commented Mar 15, 2023

This has been released as part of v3.7.5

@martinbonnin martinbonnin mentioned this pull request Mar 15, 2023
@martinbonnin martinbonnin mentioned this pull request Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants