dune icon indicating copy to clipboard operation
dune copied to clipboard

`dune cache trim --since <time interval>` for CI workflows

Open nojb opened this issue 1 year ago • 2 comments

For integration in CI workflows, it would be useful to have a flag telling dune cache trim to perform the trimming, but only if sufficient time has passed since the last trim: eg dune cache trim --since 1week. One can then execute this command as often as one would like, knowing that the trim will never happen more frequently than every week.

nojb avatar Oct 04 '24 06:10 nojb

How would you record when the last trim happened? You can't do this in the _build directory since there are potentially multiple. You can't do this in the config, because dune might not be running with the correct permissions to edit to config. The cache folder could potentially be a place for a last trim timestamp.

Alizter avatar Oct 19 '24 17:10 Alizter

The cache folder could potentially be a place for a last trim timestamp.

Indeed, this is the natural place for it.

nojb avatar Oct 19 '24 17:10 nojb

Low priority. Let's close for now.

nojb avatar Jul 12 '25 05:07 nojb