Clear entityBlockMapper cache after 5 seconds

This commit is contained in:
Intelli 2023-09-22 15:51:38 -06:00
parent 9f3196dc97
commit f76b0d45bd
4 changed files with 10 additions and 6 deletions

View file

@ -26,7 +26,7 @@ public class CacheHandler implements Runnable {
public void run() {
while (ConfigHandler.serverRunning) {
try {
for (int id = 0; id < 7; id++) {
for (int id = 0; id < 8; id++) {
Thread.sleep(1000);
int scanTime = 30;
Map cache = CacheHandler.lookupCache;
@ -55,6 +55,10 @@ public class CacheHandler implements Runnable {
cache = CacheHandler.entityCache;
scanTime = 3600; // 60 minutes
break;
case 7:
cache = ConfigHandler.entityBlockMapper;
scanTime = 5;
break;
}
int timestamp = (int) (System.currentTimeMillis() / 1000L) - scanTime;