Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Xiphe
Copy link
Collaborator

@Xiphe Xiphe commented Mar 26, 2025

  1. Background refreshes are now de-duplicated as expected
    By moving the timeout/sleep just before the potential heavy work happens in getFreshValue

  2. deprecate-staleRefreshTimeout is deprecated as an option in favor of manually handling it like

    As discussed in Only one pending refresh on staleRefreshTimeoutΒ #132, this option was only added to stay 100% backwards compatible with the original implementation and now seems to be rather misleading.

Xiphe added 3 commits March 26, 2025 22:07
prior to this syncrounous calls or cases with staleRefreshTimeout > 0 would
queue up a lot of work and thereby behave different to the default de-duplication
behavior

this change queues up background refreshes imediately and then delays the
potentially bigger work in `getFreshValue`

fix #132
@Xiphe Xiphe requested a review from kentcdodds March 26, 2025 21:28
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks great to me! Cool solution πŸ‘

@kentcdodds kentcdodds merged commit b21a54a into main Apr 3, 2025
4 checks passed
@kentcdodds kentcdodds deleted the deprecate-staleRefreshTimeout branch April 3, 2025 00:23
@github-actions
Copy link

github-actions bot commented Apr 3, 2025

πŸŽ‰ This PR is included in version 5.5.2 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants