Skip to content

JsCache rework

Karel Hanák requested to merge cache_rework into master

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:

  1. Cache doesn't exist
  2. Download cache, success
  3. Cache exists check, success
  4. Load cache, success

  1. Cache doesn't exist
  2. Download cache, failure
  3. Cache exists check, failure, exit

  1. Cache doesn't exist
  2. Download cache, success
  3. Cache exists check, success
  4. Load cache, failure
  5. Delete cache (download / storing was successful, but could not be loaded => invalid or corrupted), exit

  1. Cache exists
  2. Check for new cache, up to date
  3. Cache exists check, success
  4. Load cache, success

  1. Cache exists
  2. Check for new cache, up to date
  3. Cache exists check, success
  4. Load cache, failure
  5. Delete cache, exit

  1. Cache exists
  2. Check for new cache, outdated
  3. Download cache, success
  4. Cache exists check, success
  5. Load cache, success

  1. Cache exists
  2. Check for new cache, outdated
  3. Download cache, success
  4. Cache exists check, success
  5. Load cache, failed
  6. Delete cache (new cache invalid or corrupted), exit

  1. Cache exists
  2. Check for new cache, outdated
  3. Download cache, failed
  4. Cache exists check, success
  5. Load cache, success

  1. Cache exists
  2. Check for new cache, outdated
  3. Download cache, failed
  4. Cache exists check, success
  5. Load cache, failed
  6. Delete cache (old cache invalid or corrupted), exit

Signed-off-by: Karel Hanák karel.hanak@iqrf.org

Edited by Karel Hanák

Merge request reports

Loading