nvda
54a4ec59 - Add-on store: Improve refreshing the cache (#15071)

Commit
2 years ago
Add-on store: Improve refreshing the cache (#15071) Fixes #15034 Fixes #15077 Summary of the issue: The store data cache is refreshed every 6 hours. This may not be enough and it's desirable to add a mechanism to refresh it making a small request to the server, so we can request data just when a new commit has been done to the views branch of the nvaccess/addon-datastore repo. Description of user facing changes When opening the add-on store, if there has been changes on the server, the cached data should be updated. Description of development approach In dataManager, a function has been added to get the cacheHash from NV Access server. References to date, including parameters of functions, have been replaced with variables which hold the value of the cache hash. try... except clauses have been used to ensure that .json files which store cache data are valid,though perhaps a jsonschema will be more robust and will allow to control data types. network.py has been tweaked.
Author
Parents
Loading