Refresh -> Cache mechanism
ericoporto opened this issue · comments
OK, so turns out directly updating the interface object can cause a bit of confusion if you are also using the command line interface.
So we can solve this by doing the following
Web Cache
GitHub releases -> Get list to Cache
File Cache
Managed editors -> Get list to Cache
Other installed editors -> Get list to Cache
AGS Gamer projects -> Get list to Cache
List in cache updated -> update the visual representation in UI
There should be probably a way to watch the local files for modifications - the cache files, which are few. For Editor installation, it's import to refresh the locally installed editors before, and also to update web cache if it's empty.
Edit: turns out there isn't a good way to watch the file system for changes, so instead we can check the files periodically in a thread, since it's only 4 files, should be reasonably safe.
This may be a bit over engineered, maybe it's better to cache only for the web and local files are required to be found on each run, I need to think more about this.