Optimize boot time

This commit is contained in:
utkabobr
2025-04-01 23:06:08 +03:00
parent 6092f123b5
commit 662018834e
14 changed files with 337 additions and 41 deletions
@@ -0,0 +1,20 @@
package ru.ytkab0bp.slicebeam.boot;
import java.io.File;
import ru.ytkab0bp.slicebeam.SliceBeam;
public class ClearModelCacheTask extends BootTask {
@SuppressWarnings("ResultOfMethodCallIgnored")
public ClearModelCacheTask() {
super(()->{
File cache = SliceBeam.getModelCacheDir();
if (cache.exists()) {
for (File f : cache.listFiles()) {
f.delete();
}
}
});
onWorker();
}
}