alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
277 stars 49 forks source link

Cache management #1606

Open mosteo opened 6 months ago

mosteo commented 6 months ago

To avoid unbounded growth.

I'm thinking of something simple, like having a size soft limit and evict the oldest builds when exceeded.

Fabien-Chouteau commented 6 months ago

I feel like this will be a headache to implement. How would you compute the size of builds?

mosteo commented 6 months ago

It could turn out to be, but I was thinking of simply the size of the folder, we already have one Alire.Directories.Tree_Size. Also I was thinking of treating it as a very soft limit: not deleting anything younger than e.g. one week to avoid cycling, and probably make it only on demand, something like docker system prune, git gc, pip cache purge (those are the similar ones I can think of).