return len(self.content)
def evict(self):
- if self.content is None or len(self.content) == 0:
+ if not self.content:
return
# The mmap region might be in use when we decided to evict
# Map in all the files we found, up to maxslots, if we exceed
# maxslots, start throwing things out.
- cachelist = collections.OrderedDict()
+ cachelist: collections.OrderedDict = collections.OrderedDict()
for b in blocks:
got = DiskCacheSlot.get_from_disk(b[0], cachedir)
if got is None: