flpq_data.dataset.clear_cache#

clear_cache(keep: str | None = None) → list[Path][source]#

Remove the cached dataset versions, optionally keeping one.

Every version directory under the cache root is removed except the one named by keep; keep=None removes all of them. Non-directory entries under the root are left untouched.

Parameters:
keepstr, optional

The dataset version to keep (default None — remove everything).

Returns:
removedlist of Path

The removed version directories, in sorted order; empty when the cache root does not exist or nothing was removed.

Examples

>>> from flpq_data import *
>>> clear_cache()
[]