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

fix: stale time with huge value #25

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

benjaminkwokhuen
Copy link
Contributor

@benjaminkwokhuen benjaminkwokhuen commented Feb 16, 2022

In Javascript, setTimeout has a limit. If the ms exceeds that, the setTimeout callback will be executed after 1 ms.

This is not an expected behavior. For example, I would like to pass in Infinity to have that value stale for a very long time. Currently, passing Infinity will have no effect.

ref: https://stackoverflow.com/questions/3468607/why-does-settimeout-break-for-large-millisecond-delay-values

Fixed #26

@k-ode k-ode merged commit 8695b5a into ConrabOpto:main Feb 17, 2022
@k-ode
Copy link
Contributor

k-ode commented Feb 17, 2022

TIL. Thanks! Released as 1.0.9

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.

Very large staletime and cachetime
2 participants