add items() to LRUCache

This commit is contained in:
Victor Shyba 2021-06-04 12:20:44 -03:00
parent 00d038c8f3
commit 4e6b4f179b

View file

@ -310,6 +310,9 @@ class LRUCache:
self.cache.popitem(last=False) self.cache.popitem(last=False)
self.cache[key] = value self.cache[key] = value
def items(self):
return self.cache.items()
def clear(self): def clear(self):
self.cache.clear() self.cache.clear()