Base file system cache interface. Args: cache_root_location (str): The root location to store files. kwargs(dict): The keyword arguments.
(
self,
cache_root_location: str,
**kwargs,
)
| 30 | """ |
| 31 | |
| 32 | def __init__( |
| 33 | self, |
| 34 | cache_root_location: str, |
| 35 | **kwargs, |
| 36 | ): |
| 37 | """Base file system cache interface. |
| 38 | |
| 39 | Args: |
| 40 | cache_root_location (str): The root location to store files. |
| 41 | kwargs(dict): The keyword arguments. |
| 42 | """ |
| 43 | self._cache_lock = threading.RLock() |
| 44 | |
| 45 | os.makedirs(cache_root_location, exist_ok=True) |
| 46 | self.cache_root_location = cache_root_location |
| 47 | self.load_cache() |
| 48 | |
| 49 | def get_root_location(self): |
| 50 | return self.cache_root_location |