Browse Source

Made cache_dir argument with CACHE_DIR as default

master
Raphael Roberts 5 years ago
parent
commit
2401e0a1e3
  1. 6
      tibi_hardlinks/cache.py

6
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:

Loading…
Cancel
Save