ConrabOpto / mst-query

Query library for mobx-state-tree
MIT License
110 stars 7 forks source link

Very large staletime and cachetime #26

Closed benjaminkwokhuen closed 2 years ago

benjaminkwokhuen commented 2 years ago

In Javascript, setTimeout has a limit. If the ms exceeds that, the setTimeout call will be 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