File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Plan/src/main/java/com/djrapitops/plan/system/cache Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 7
7
import com .djrapitops .plan .api .exceptions .EnableException ;
8
8
import com .djrapitops .plan .system .PlanSystem ;
9
9
import com .djrapitops .plan .system .SubSystem ;
10
+ import com .djrapitops .plugin .api .TimeAmount ;
11
+ import com .djrapitops .plugin .task .AbsRunnable ;
12
+ import com .djrapitops .plugin .task .RunnableFactory ;
10
13
import com .djrapitops .plugin .utilities .Verify ;
11
14
12
15
/**
@@ -40,6 +43,13 @@ public static CacheSystem getInstance() {
40
43
public void enable () throws EnableException {
41
44
dataCache .enable ();
42
45
geolocationCache .enable ();
46
+
47
+ RunnableFactory .createNew ("DataContainer cache clean task" , new AbsRunnable () {
48
+ @ Override
49
+ public void run () {
50
+ dataContainerCache .clear ();
51
+ }
52
+ }).runTaskTimerAsynchronously (TimeAmount .MINUTE .ticks (), TimeAmount .MINUTE .ms ());
43
53
}
44
54
45
55
@ Override
You can’t perform that action at this time.
0 commit comments