Skip to content

Commit fc99eb3

Browse files
authored
Add cache cleaning task for ML snapshot (#37505)
The ML subproject of xpack has a cache for the cpp artifact snapshots which is checked on each build. The cache is outside of the build dir so that it is not wiped on a typical clean, as the artifacts can be large and do not change often. This commit adds a cleanCache task which will wipe the cache dir, as over time the size of the directory can become bloated.
1 parent 9b32f57 commit fc99eb3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x-pack/plugin/ml/cpp-snapshot/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ task downloadMachineLearningSnapshot {
4646
}
4747
}
4848

49+
task cleanCache(type: Delete) {
50+
delete "${projectDir}/.cache"
51+
}
52+
4953
artifacts {
5054
'default' file: snapshotZip, name: 'ml-cpp', type: 'zip', builtBy: downloadMachineLearningSnapshot
5155
}

0 commit comments

Comments
 (0)