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

Tweak the custom fetch policy #1540

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Tweak the custom fetch policy #1540

merged 1 commit into from
Feb 20, 2025

Conversation

BoD
Copy link
Collaborator

@BoD BoD commented Feb 17, 2025

The interceptor introduced in #1537 fetches data in the background, which can make the UI change while the user is using the app without an action from their part. This can be confusing or annoying.

Instead, this version returns the data from the cache if it's fresh, if not, tries the network, and if that didn't work, falls back to the stale data from the cache.

Thanks @martinbonnin for the idea!

Copy link
Collaborator

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

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

No more rug pulling! 🎉

@BoD BoD merged commit a09ed13 into main Feb 20, 2025
5 checks passed
@BoD BoD deleted the tweak-fetch-policy branch February 20, 2025 09:40
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.

2 participants