mailgun / expiringdict

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

Add support for infinite-size dict #12

Open LunaticNeko opened 9 years ago

LunaticNeko commented 9 years ago

Presently expiringdict does not support infinite-size dicts, where keys are only deleted after the timer has expired. I added a small condition that allows infinite-size dicts to exist. To allow infinite members, set the size to 0. Theoretically it can be anything, even "None", but I find 0 to be the easiest to introduce right now.