repository_cache: touch files on cache hit
...to mark that the file as used. In this way, the file stamps
in the cache can be used to indicate which files are still in use.
@@ -139,6 +139,7 @@ public class RepositoryCache {
FileSystemUtils.createDirectoryAndParents(targetPath.getParentDirectory());
FileSystemUtils.copyFile(cacheValue, targetPath);
+ FileSystemUtils.touchFile(cacheValue);
return targetPath;
}
@@ -249,5 +250,4 @@ public class RepositoryCache {
public Path getContentAddressableCachePath() {
return contentAddressablePath;
}
-
}
