diff --git a/hub/common.py b/hub/common.py index 10196c2..b59b588 100644 --- a/hub/common.py +++ b/hub/common.py @@ -522,7 +522,7 @@ class LargestValueCache: def __init__(self, capacity: int): self._capacity = max(capacity, 0) self._cache = {} - self._raw_cache: Deque[LargestValueCacheItem] = deque() + self._raw_cache: Deque[LargestValueCacheItem] = deque(maxlen=capacity) def items(self): return self._cache.items()