Page MenuHomeSoftware Heritage

phabricator/utils: Revoke the cache if it's invalid on disk
AbandonedPublic

Authored by ardumont on Oct 14 2022, 2:06 PM.

Details

Reviewers
None
Group Reviewers
System administration
Summary

Without commit, if the local cache file is holding NIL for some reason, then the
resulted cache data used is nil as well.

This commit fixes by revoking the cache when the list of objects read from it is empty.

Test Plan

Tested locally with file with NIL instead of actual data (i had the case for whatever reason).
Then trigger back the get-objects function and this file got overwritten with actual data.

Diff Detail

Repository
R263 forgerie
Branch
swh-improvments
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 32308
Build 50606: arc lint + arc unit