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