-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 = Infinity #9
Comments
Idk, kinda sounds like a footgun. If you want an item that doesn't have a TTL, better off using a More to the point, it would require a different data structure internally to do that. This module is able to efficiently prune by taking advantage of the fact that V8 keeps numeric object keys sorted. If a value's TTL is |
Actually this might not be so bad. It does reduce performance a bit to have the string |
Actually I can do it without having |
Hi Isaacs, thank you for considering this idea.
I’m working on a distributed bottom-up data publisher in which each node is
responsible for a small part of the data, but can cache data that is
resolved by other nodes.
I use ttlcache for this.
The small “data that I own” is stored in the ttlcache object but should
never expire. The rest is real cache.
At the moment my implementation consists in re-setting the data on delete
based on a flag in the record.
I totally understand that mine is quite of a niche use case. But who knows…
maybe it may turn to be useful to others as well.
Thanks for the great tool.
Marco
|
Hello and thanks for this package.
I'd like to propose that TTL could be set to
Infinity
pretty much same as for themax
config param.This would let setting some items as "pinned" into a TTL cache mechanism.
Thanks again,
Marco
The text was updated successfully, but these errors were encountered: