Closed epage closed 5 years ago
If this is a problem...
So the main thing we need is a way to identify the start and end of the build to know what was accessed in that window because if it wasn't access, it probably can be cleared.
cargo-sweep
.So I started looking into it a bit and found this on Travis https://docs.travis-ci.com/user/caching#how-does-caching-work, I am guessing other hosted providers use a similar underlying solution. The thing about this is that this will instead involve accessing all cache files as part of the unpacking. Therefor making it impossible to distinguish between older and newer target files.
As for your idea about a timestamp generation step I think it is pretty neat, but I would have liked a single command to solve this problem but it seems hard to achieve :/ Then we would have something like: cargo sweep --stamp
then cargo build ...
and finally cargo sweep -f <sweep-file>
This also be a replacement/related to #2
Not sure if this is actually a concern, of whether the atime is preserved on caches or not.
The goal would be for us to be able to run
cargo-sweep
before cache creation to remove everything unnecessary to make caches smaller so creation and load are faster (and because we'd be better citizens with Travis who gives this stuff to us for free)