mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-19 02:11:55 +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 static AuthMe authme;
|
||||||
|
|
||||||
private final Server server = getServer();
|
private final Server server = getServer();
|
||||||
private final Logger authmeLogger = Logger.getLogger("AuthMe");
|
private final Logger authmeLogger = getLogger();
|
||||||
public Management management;
|
public Management management;
|
||||||
public NewAPI api;
|
public NewAPI api;
|
||||||
private Utils utils = Utils.getInstance();
|
private Utils utils = Utils.getInstance();
|
||||||
|
@ -41,12 +41,8 @@ public class CacheDataSource implements DataSource {
|
|||||||
user = user.toLowerCase();
|
user = user.toLowerCase();
|
||||||
if (cache.containsKey(user)) {
|
if (cache.containsKey(user)) {
|
||||||
return cache.get(user);
|
return cache.get(user);
|
||||||
} else {
|
|
||||||
PlayerAuth auth = source.getAuth(user);
|
|
||||||
if (auth != null)
|
|
||||||
cache.put(user, auth);
|
|
||||||
return auth;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user