https://metaplay.io logo
GlobalStateProxyActor question
# questions-and-feedback
d
I can't work out whether this call results in a network call. ActiveGameConfig activeGameConfig = GlobalStateProxyActor.ActiveGameConfig.Get(); IGameConfigDataResolver resolver = activeGameConfig.BaselineGameConfig.SharedConfig; I'm thinking of doing it in the SessionActor frequently and just wondering whether it's something that I should potentially cache rather that execute on every request. Thanks
n
Hi, this doesn't do a network call. ActiveGameConfig is kept in memory on each server and updated when the active config changes. (It's sent from GlobalStateManager to each GlobalStateProxy - a Proxy is running on each server.) Depending on your use case, there can be a different reason to cache it: publishing a new game config makes it the active one, which means different Get() calls can return different configs. If it's important that the same config is used for the whole session, it makes sense to cache. But if not (or if it's indeed desirable to always get the active one), then it should be OK to Get() it every time.
d
Great. Thanks for the details.