Closed internety closed 7 years ago
example:
from expiringdict import ExpiringDict from time import sleep expirationtest = ExpiringDict(max_len=100, max_age_seconds=5) expirationtest["testing123"]="somedata" print expirationtest.keys() sleep(6) print expirationtest.keys()
above example will print 'testing123' twice.
i am using python 2.7.10 and freshly installed expiringdict (via pip)
From the readme, this appears to be known and potetially intended.
Note: Iteration over dict and also keys() do not remove expired values!
You have right. Didn't read docs carefully enough....
example:
above example will print 'testing123' twice.
i am using python 2.7.10 and freshly installed expiringdict (via pip)