forked from zhdev/griefus
Clear entityBlockMapper cache after 5 seconds
This commit is contained in:
parent
9f3196dc97
commit
f76b0d45bd
4 changed files with 10 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue