gc_cache#
- scikitplot.cython.gc_cache(*, cache_dir=None, keep_n_newest=None, max_age_days=None, max_bytes=None, dry_run=False, lock_timeout_s=60.0)[source]#
Deterministically garbage-collect cached build entries.
- Parameters:
- cache_dirstr or pathlib.Path or None, default=None
Cache root. If None, uses the default cache location.
- keep_n_newestint or None, default=None
If provided, keep at least the N newest entries (across modules and packages).
- max_age_daysint or None, default=None
If provided, delete entries older than this many days.
- max_bytesint or None, default=None
If provided, delete oldest entries until total cache size is <= max_bytes.
- dry_runbool, default=False
If True, do not delete anything; only report what would be deleted.
- lock_timeout_sfloat, default=60.0
Max seconds to wait for a cache-root GC lock.
- Returns:
- scikitplot.cython.CacheGCResult
GC report.
- Raises:
- ValueError
If any numeric parameter is invalid.
- Parameters:
- Return type: