From 2401e0a1e35c4edff10f953335de9c3446c65096 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Fri, 12 Mar 2021 21:47:54 -0600 Subject: [PATCH] Made cache_dir argument with CACHE_DIR as default --- tibi_hardlinks/cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: