mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 23:48:08 -05:00
cache mod server info requests
This commit is contained in:
parent
fa62b8813e
commit
ec5dafbc8f
1 changed files with 1 additions and 2 deletions
|
@ -48,8 +48,7 @@ server::ServerModMetadata const* ModSource::asServer() const {
|
|||
server::ServerPromise<server::ServerModMetadata> 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<server::ServerModMetadata>([&metadata](auto resolve, auto) {
|
||||
|
|
Loading…
Reference in a new issue