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

refactor: change cache policy during manual refresh #339

Merged
merged 3 commits into from
Mar 1, 2025

Conversation

cbeyls
Copy link
Collaborator

@cbeyls cbeyls commented Mar 1, 2025

Add a refresh boolean argument to use cases to allow changing the cache policy during refresh and attempt to load from network first instead of cache first.

Currently the refresh indicator is hidden when the cache response arrives before the network response which is not accurate because the refresh is still in progress.
This change allows the refresh indicator to be accurate and only hide after the network query completes (with success or error). In case of error, the cache response will be pushed instead if available.

…he policy during refresh and attempt to load from network first
@cbeyls cbeyls self-assigned this Mar 1, 2025
@cbeyls cbeyls merged commit fe13c55 into main Mar 1, 2025
1 check passed
@cbeyls cbeyls deleted the refactor/refresh_cache_policy branch March 1, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant