129
129
if self._size != 0 and obj_info not in self._new_cache:
130
130
if len(self._new_cache) >= self._size:
132
132
self._new_cache[obj_info] = obj_info.get_obj()
134
134
def remove(self, obj_info):
136
136
in_new_cache = self._new_cache.pop(obj_info, None) is not None
137
137
in_old_cache = self._old_cache.pop(obj_info, None) is not None
138
138
return in_new_cache or in_old_cache
140
140
def set_size(self, size):
143
143
After calling this, the cache may still contain more than `size`
144
144
objects, but no more than twice that number.