This repository was archived by the owner on Feb 28, 2023. It is now read-only.
This repository was archived by the owner on Feb 28, 2023. It is now read-only.
Workaround cargo
fingerprinting mtime
#165
Open
Description
Every time cache gets downloaded/copied/unzipped it receives a newer mtime
than your git diff
will ever be. It's not the case for the local caching obviously. This is majorly the case for all the CI use-cases both for sccache
and cachepot
, and for a long time. Moreover, both are showing the cache hits, but afterwards, all the cache is being invalidated.
The workaround we could come up with, would be to update mtime
of the modified files so they are newer than the cache artifacts:
git-restore-mtime
- find out the
git diff
touch
the files were changed
Showcased in comparison with rusty-cachier
in use-ink/cargo-contract#635.
cc @gilescope @rcny rust-lang/cargo#8623 smithy-lang/smithy-rs#1422