Commit 0012ca0f authored by Jason Madden's avatar Jason Madden

Go back to assuming that cache.lru_items and cache.cache_data are in sync....

Go back to assuming that cache.lru_items and cache.cache_data are in sync. Otherwise we have corruption in the cache and, under PyPy, a CFFI-level memory leak; we want tests to fail in that case.
parent 5d38a086
......@@ -1018,10 +1018,9 @@ class Connection(ExportImport, object):
items = self._cache.lru_items()
# fine everything. some on the lru list, some not
everything = self._cache.cache_data
# remove those items that are on the lru list (which may not actually
# be in the full cache, under the Python implementation)
# remove those items that are on the lru list
for k,v in items:
everything.pop(k, None)
del everything[k]
# return a list of [ghosts....not recently used.....recently used]
return list(everything.items()) + items
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment