Currently, we cache maps in MapContentAPI, and we cache game versions in GameContentAPI. We should also add caching for engine content and at the same time add parsed AI info to the cache for both game and engine AIs. Currently, we have the AiContentAPI which has methods for caching and fetching AIs based on engine/game versions, but this info isn't actually saved to disk anywhere and has a small runtime cost any time a new battle is opened. It's also not the cleanest code due the async nature of these methods and they're not being awaited in certain places which can sometimes cause errors like: https://github.com/beyond-all-reason/bar-lobby/issues/134
All content (engine, game and maps) should have content we need from them cached when they are downloaded.
Currently, we cache maps in
MapContentAPI
, and we cache game versions inGameContentAPI
. We should also add caching for engine content and at the same time add parsed AI info to the cache for both game and engine AIs. Currently, we have theAiContentAPI
which has methods for caching and fetching AIs based on engine/game versions, but this info isn't actually saved to disk anywhere and has a small runtime cost any time a new battle is opened. It's also not the cleanest code due the async nature of these methods and they're not being awaited in certain places which can sometimes cause errors like: https://github.com/beyond-all-reason/bar-lobby/issues/134All content (engine, game and maps) should have content we need from them cached when they are downloaded.