From ec5dafbc8fec42e3e24199763f25d8e159229820 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Sat, 23 Mar 2024 19:49:26 +0200 Subject: [PATCH] cache mod server info requests --- loader/src/ui/mods/sources/ModSource.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/loader/src/ui/mods/sources/ModSource.cpp b/loader/src/ui/mods/sources/ModSource.cpp index 75d673e6..a316d51e 100644 --- a/loader/src/ui/mods/sources/ModSource.cpp +++ b/loader/src/ui/mods/sources/ModSource.cpp @@ -48,8 +48,7 @@ server::ServerModMetadata const* ModSource::asServer() const { server::ServerPromise ModSource::fetchServerInfo() const { return std::visit(makeVisitor { [](Mod* mod) { - // todo: cache - return server::getMod(mod->getID()); + return server::ServerResultCache<&server::getMod>::shared().get(mod->getID()); }, [](server::ServerModMetadata const& metadata) { return server::ServerPromise([&metadata](auto resolve, auto) {