`dune cache trim --since <time interval>` for CI workflows
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.
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.
The cache folder could potentially be a place for a last trim timestamp.
Indeed, this is the natural place for it.
Low priority. Let's close for now.