TTLCache without max size
Closed this issue · 2 comments
and-semakin commented
I noticed that I usually don't care about cache size (number of items), but only care about time of their life when I use TTLCache
. Is there a way to disable size limits? Currently I see only workaround with passing math.inf
into maxsize
arg.
and-semakin commented
I'm talking about the same issue as described and solved in #113, but for TTLCache
object, not for decorators.
tkem commented
As stated quite prominently in the docs
For the purpose of this module, a cache is a mutable mapping of a fixed maximum size.
Settingmaxsize
tomath.inf
is the closest you'll get withcachetools
, however I've seen other implementations of an "expiring dict" which may be fitting your needs.