pyrosm.OSM.clear_cache

pyrosm.OSM.clear_cache#

static OSM.clear_cache(filepath=None)#

Remove the out-of-core engine’s result cache – the GeoParquet files that engine="out_of_core" reads write under <tempdir>/pyrosm/cache.

Parameters:

filepath (str | os.PathLike (optional)) – When given, only the cached layers for that source PBF are removed; when None (default) the whole cache is cleared.

Returns:

The number of cache files removed.

Return type:

int