diff --git a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java b/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java index bec25c85b..d27dbc922 100644 --- a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java +++ b/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java @@ -34,9 +34,9 @@ public class CacheDataSource implements DataSource { public CacheDataSource(DataSource src) { this.source = src; this.exec = Executors.newCachedThreadPool(); - cachedAuths = CacheBuilder.newBuilder() - .expireAfterWrite(5, TimeUnit.MINUTES) - .removalListener(RemovalListeners.asynchronous(new RemovalListener>() { + this.cachedAuths = CacheBuilder.newBuilder() + .expireAfterWrite(8, TimeUnit.MINUTES) + .removalListener(new RemovalListener>() { @Override public void onRemoval(RemovalNotification> removalNotification) { String name = removalNotification.getKey(); @@ -44,7 +44,7 @@ public class CacheDataSource implements DataSource { cachedAuths.getUnchecked(name); } } - }, exec)) + }) .build( new CacheLoader>() { public Optional load(String key) {