mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-07 19:31:45 +01:00
Added a 10s caching layer between database and server page creation
This commit is contained in:
parent
7e1b1fe2e8
commit
e73b89d9de
@ -9,7 +9,7 @@ import com.djrapitops.plan.api.exceptions.connection.InternalErrorException;
|
||||
import com.djrapitops.plan.api.exceptions.connection.WebException;
|
||||
import com.djrapitops.plan.api.exceptions.database.DBOpException;
|
||||
import com.djrapitops.plan.data.store.containers.AnalysisContainer;
|
||||
import com.djrapitops.plan.system.database.databases.Database;
|
||||
import com.djrapitops.plan.system.cache.CacheSystem;
|
||||
import com.djrapitops.plan.system.info.InfoSystem;
|
||||
import com.djrapitops.plan.system.info.server.ServerInfo;
|
||||
import com.djrapitops.plan.system.webserver.pages.parsing.AnalysisPage;
|
||||
@ -79,9 +79,7 @@ public class GenerateAnalysisPageRequest extends InfoRequestWithVariables implem
|
||||
try {
|
||||
runningAnalysis = true;
|
||||
UUID serverUUID = ServerInfo.getServerUUID();
|
||||
Database db = Database.getActive();
|
||||
|
||||
AnalysisContainer analysisContainer = new AnalysisContainer(db.fetch().getServerContainer(serverUUID));
|
||||
AnalysisContainer analysisContainer = CacheSystem.getInstance().getDataContainerCache().getAnalysisContainer(serverUUID);
|
||||
return new AnalysisPage(analysisContainer).toHtml();
|
||||
} catch (DBOpException e) {
|
||||
if (!e.getCause().getMessage().contains("Connection is closed")) {
|
||||
|
Loading…
Reference in New Issue
Block a user