From 7e1b1fe2e81e197b4d7e5b1d252b4cf1d42051fe Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Tue, 7 Aug 2018 17:21:33 +0300 Subject: [PATCH] Added a 10s caching layer between database and player page creation --- .../plan/system/webserver/pages/parsing/InspectPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java index 7b3dd5cf0..bbcbbbad4 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java @@ -14,6 +14,7 @@ import com.djrapitops.plan.data.store.mutators.formatting.Formatter; import com.djrapitops.plan.data.store.mutators.formatting.Formatters; import com.djrapitops.plan.data.store.mutators.formatting.PlaceholderReplacer; import com.djrapitops.plan.data.time.WorldTimes; +import com.djrapitops.plan.system.cache.CacheSystem; import com.djrapitops.plan.system.cache.SessionCache; import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.info.server.ServerInfo; @@ -59,7 +60,7 @@ public class InspectPage implements Page { } Benchmark.start("Inspect Parse, Fetch"); Database db = Database.getActive(); - PlayerContainer container = db.fetch().getPlayerContainer(uuid); + PlayerContainer container = CacheSystem.getInstance().getDataContainerCache().getPlayerContainer(uuid); if (!container.getValue(PlayerKeys.REGISTERED).isPresent()) { throw new IllegalStateException("Player is not registered"); }