don't need call to keys

This commit is contained in:
Will McGugan
2022-12-28 21:10:14 +00:00
parent 5382f5eb49
commit 51b5ebe347

View File

@@ -234,7 +234,7 @@ class FIFOCache(Generic[CacheKey, CacheValue]):
value (CacheValue): Value. value (CacheValue): Value.
""" """
if key not in self._cache and len(self._cache) >= self._maxsize: if key not in self._cache and len(self._cache) >= self._maxsize:
self._cache.pop(next(iter(self._cache.keys()))) self._cache.pop(next(iter(self._cache)))
self._cache[key] = value self._cache[key] = value
__setitem__ = set __setitem__ = set