mirror of
https://github.com/Dark98/SliceBeam.git
synced 2026-07-03 08:39:04 +00:00
Optimize boot time
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user