purge_cache#

scikitplot.cython.purge_cache(cache_dir=None)[source]#

Delete the entire cache directory.

The purge runs under the cache-root GC lock so it cannot race a concurrent garbage collection, and it refuses to run while any per-key build lock is held so an active build/publish is never destroyed mid-flight (CYTHON-GC-001). Deeper transactional purge (dry-run manifest and recovery journal) is tracked separately.

Parameters:
cache_dirstr or pathlib.Path or None, default=None

Cache root. If None, uses default.

Raises:
FileNotFoundError

If the cache directory does not exist.

RuntimeError

If one or more builds are active (a per-key build lock is held).

Parameters:

cache_dir (str | Path | None)

Return type:

None