mailgun / expiringdict

Dictionary with auto-expiring values for caching purposes.
Apache License 2.0
344 stars 76 forks source link

set max_len=None or infinite #45

Open Phil997 opened 3 years ago

Phil997 commented 3 years ago

Hello

I want an orderdict that removes a key-value pair after a certain time. expiringdict is very well suited for this. But I want to add an unlimited number of values. Is that possible at all?

for example setting the max_len=None or setting a flag infinite?

Thanks!

bansalnaman15 commented 3 years ago

did you find anything?

angel-langdon commented 3 years ago

 Easy!

dic = ExpiringDict(max_len=float("inf"), max_age_seconds=1)