fix memory leak
This commit is contained in:
parent
03eecf1206
commit
da11d02706
1 changed files with 1 additions and 0 deletions
|
@ -65,6 +65,7 @@ class LRUCache(collections.MutableMapping):
|
||||||
if self._store.__contains__(key):
|
if self._store.__contains__(key):
|
||||||
if now - self._keys_to_last_time[key] > self.timeout:
|
if now - self._keys_to_last_time[key] > self.timeout:
|
||||||
del self._store[key]
|
del self._store[key]
|
||||||
|
del self._keys_to_last_time[key]
|
||||||
c += 1
|
c += 1
|
||||||
del self._time_to_keys[least]
|
del self._time_to_keys[least]
|
||||||
if c:
|
if c:
|
||||||
|
|
Loading…
Reference in a new issue