this should not cause lag anymore if database cache is enabled.

This commit is contained in:
DNx5 2015-09-15 15:03:00 +07:00
parent 3620b712b7
commit 3996c8cfca
2 changed files with 2 additions and 6 deletions

View File

@ -56,7 +56,7 @@ public class AuthMe extends JavaPlugin {
private static AuthMe authme;
private final Server server = getServer();
private final Logger authmeLogger = Logger.getLogger("AuthMe");
private final Logger authmeLogger = getLogger();
public Management management;
public NewAPI api;
private Utils utils = Utils.getInstance();

View File

@ -41,12 +41,8 @@ public class CacheDataSource implements DataSource {
user = user.toLowerCase();
if (cache.containsKey(user)) {
return cache.get(user);
} else {
PlayerAuth auth = source.getAuth(user);
if (auth != null)
cache.put(user, auth);
return auth;
}
return null;
}
@Override