fix bug!
if _last_visits[index] len > 1
This commit is contained in:
parent
6683dfd3bb
commit
4d24b7477a
1 changed files with 1 additions and 1 deletions
|
@ -87,8 +87,8 @@ class LRUCache(collections.MutableMapping):
|
|||
if value not in self._closed_values:
|
||||
self.close_callback(value)
|
||||
self._closed_values.add(value)
|
||||
self._last_visits.popleft()
|
||||
for key in self._time_to_keys[least]:
|
||||
self._last_visits.popleft()
|
||||
if key in self._store:
|
||||
if now - self._keys_to_last_time[key] > self.timeout:
|
||||
del self._store[key]
|
||||
|
|
Loading…
Reference in a new issue