2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-05-26 22:37:17 +00:00

Remove internal cache because it's a mess

This commit is contained in:
Tux
2016-02-26 23:17:24 -05:00
parent 3e3295b9f6
commit 546ee7566d
5 changed files with 31 additions and 230 deletions
@@ -1,5 +1,7 @@
package com.imaginarycode.minecraft.redisbungee;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.collect.*;
import com.google.common.io.ByteStreams;
import com.google.gson.Gson;
@@ -64,7 +66,9 @@ public final class RedisBungee extends Plugin {
private LuaManager.Script getServerPlayersScript;
private static final Object SERVER_TO_PLAYERS_KEY = new Object();
private final InternalCache<Object, Multimap<String, UUID>> serverToPlayersCache = new InternalCache<>(2000);
private final Cache<Object, Multimap<String, UUID>> serverToPlayersCache = CacheBuilder.newBuilder()
.expireAfterWrite(5, TimeUnit.SECONDS)
.build();
/**
* Fetch the {@link RedisBungeeAPI} object created on plugin start.