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
ttl
documentation
#316
Comments
Yeah, could be documented better. In practice, |
Via ttl documentation - https://github.com/isaacs/node-lru-cache?tab=readme-ov-file#ttl:
If |
Yes, zero is the default, which means (on a single item, or the cache as a whole) "do not do track TTL", not "go stale immediately". It can be any non-negative integer, not just positive, that's a inaccuracy in the docs. |
Awesome! @isaacs One last question - and if you dont get to it, its fine If my configuration is only I just want to check if a key is in the cache and with no other side effects |
Yes. |
Seeking clarification on the
ttl
option. TheREADME
states "positive integer only" but in code it defaults to0
, suggesting0
is also valid (even if it means the same asundefined
. Elsewhere, i.e. theMilliseconds
type also states "positive integer only".Happy to open a PR, just looking for clarity on the expectation/intent before I do (unless you think everything is correct as it stands).
The text was updated successfully, but these errors were encountered: