diff --git a/tibi_hardlinks/cache.py b/tibi_hardlinks/cache.py index c1cc5df..bf34060 100644 --- a/tibi_hardlinks/cache.py +++ b/tibi_hardlinks/cache.py @@ -7,10 +7,10 @@ from tibi_hardlinks.config import CACHE_DIR class Cache: - def __init__(self): + def __init__(self, cache_dir=CACHE_DIR): self._store = None - self.filepath = Path(CACHE_DIR) / "cache.pkl.lzma" - atexit.register(self.save) + self.filepath = Path(cache_dir) / "cache.pkl.lzma" + atexit.register(self.store) def read(self, key): if self.store is None: