allenai / allenai/cached_path

Add cache limits

未关闭
#258 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Feature request
主要语言
Python
星标
47
派生
22
PR 合并指标
30 天内没有已合并 PR

描述

**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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。