diff --git a/llama_cpp/llama_cache.py b/llama_cpp/llama_cache.py index e059e98e1b..4d64443cc2 100644 --- a/llama_cpp/llama_cache.py +++ b/llama_cpp/llama_cache.py @@ -108,7 +108,7 @@ def __init__( self, cache_dir: str = ".cache/llama_cache", capacity_bytes: int = (2 << 30) ): super().__init__(capacity_bytes) - self.cache = diskcache.Cache(cache_dir) + self.cache = diskcache.Cache(cache_dir, size_limit=capacity_bytes) @property def cache_size(self):