JsCache rework
closes #233 (closed)
-
Delete cache if first load and initialization fails -
Create jsonschemas for cache data and validate data in update-cache script
Expected JsCache activate flows:
- Cache doesn't exist
- Download cache, success
- Cache exists check, success
- Load cache, success
- Cache doesn't exist
- Download cache, failure
- Cache exists check, failure, exit
- Cache doesn't exist
- Download cache, success
- Cache exists check, success
- Load cache, failure
- Delete cache (download / storing was successful, but could not be loaded => invalid or corrupted), exit
- Cache exists
- Check for new cache, up to date
- Cache exists check, success
- Load cache, success
- Cache exists
- Check for new cache, up to date
- Cache exists check, success
- Load cache, failure
- Delete cache, exit
- Cache exists
- Check for new cache, outdated
- Download cache, success
- Cache exists check, success
- Load cache, success
- Cache exists
- Check for new cache, outdated
- Download cache, success
- Cache exists check, success
- Load cache, failed
- Delete cache (new cache invalid or corrupted), exit
- Cache exists
- Check for new cache, outdated
- Download cache, failed
- Cache exists check, success
- Load cache, success
- Cache exists
- Check for new cache, outdated
- Download cache, failed
- Cache exists check, success
- Load cache, failed
- Delete cache (old cache invalid or corrupted), exit
Signed-off-by: Karel Hanák karel.hanak@iqrf.org
Edited by Karel Hanák