cherab.imas.datasets.clear_cacheΒΆ
-
cherab.imas.datasets.clear_cache(datasets: Callable[[...], str] | Collection[Callable[[...], str]] | None =
None) NoneSourceΒΆ Clean the cherab-imas datasets cache directory.
If a
cherab.imas.datasetsmethod or a list/tuple of the same is provided, thenclear_cacheremoves all the data files associated to the passed dataset method callable(s).By default, it removes all the cached data files.
- Parameters:
- datasets: Callable[[...], str] | Collection[Callable[[...], str]] | None =
NoneΒΆ cherab.imas.datasetsmethod or a list/tuple of the same whose cached data files are to be removed. IfNone, all the cached data files are removed.
- datasets: Callable[[...], str] | Collection[Callable[[...], str]] | None =
Examples
>>> from cherab.imas import datasets >>> data_path = datasets.iter_jintrac() >>> datasets.clear_cache([datasets.iter_jintrac]) Cleaning the file iter_scenario_53298_seq1_DD4.nc for dataset iter_jintracIf no argument is passed, all cached dataset files are removed.
>>> datasets.clear_cache() Cleaning the cache directory ~/Library/Caches/cherab/imas!