allenai / allenai/cached_path

Add cache limits

Offen
#258 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Feature request
Vorherrschende Sprache
Python
Sterne
47
Forks
22
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Is your feature request related to a problem? Please describe.**
Currently the size of the cache directory can grow unbounded. This can cause problems (e.g. disk full) and require manual intervention (e.g. manually deleting the entire cache directory).

**Describe the solution you'd like**
Add size/age limits to the cache directory and the ability for users to enforce those limits by deleting the least recently used data with a function call. Similar to the "reduce_size" function in joblib.memory ([link](https://joblib.readthedocs.io/en/latest/generated/joblib.Memory.html#joblib.Memory.reduce_size)).

**Describe alternatives you've considered**
A cron job to automatically remove the entire cache direction is a hack and seems like overkill.

**Additional context**
None

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.