From 579f95f9fc27feda845c7b6d4e1981db3728ca62 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 26 Aug 2022 11:38:56 -0400 Subject: [PATCH] set maxlen --- hub/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()