mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -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 {
|
server::ServerPromise<server::ServerModMetadata> ModSource::fetchServerInfo() const {
|
||||||
return std::visit(makeVisitor {
|
return std::visit(makeVisitor {
|
||||||
[](Mod* mod) {
|
[](Mod* mod) {
|
||||||
// todo: cache
|
return server::ServerResultCache<&server::getMod>::shared().get(mod->getID());
|
||||||
return server::getMod(mod->getID());
|
|
||||||
},
|
},
|
||||||
[](server::ServerModMetadata const& metadata) {
|
[](server::ServerModMetadata const& metadata) {
|
||||||
return server::ServerPromise<server::ServerModMetadata>([&metadata](auto resolve, auto) {
|
return server::ServerPromise<server::ServerModMetadata>([&metadata](auto resolve, auto) {
|
||||||
|
|
Loading…
Reference in a new issue