mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-11 06:38:00 +02:00
this should not cause lag anymore if database cache is enabled.
This commit is contained in:
parent
3620b712b7
commit
3996c8cfca
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user