fix cache

This commit is contained in:
Jack Robison 2022-08-27 10:12:35 -04:00
parent 84b978278e
commit f7eca425eb
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -542,9 +542,9 @@ class LargestValueCache:
return False return False
popped = self._raw_cache.popleft() popped = self._raw_cache.popleft()
self._cache.pop(popped.key) self._cache.pop(popped.key)
self._cache[key] = value
item = LargestValueCacheItem(key, value) item = LargestValueCacheItem(key, value)
insort_right(self._raw_cache, item) insort_right(self._raw_cache, item)
self._cache[key] = value
return True return True
def clear(self): def clear(self):