Handle missing cache.properties
Prior to this commit, the check whether initialization is required
threw a `FileNotFoundException` when cache.properties did not exist.
Since the file is only created when `DefaultPersistentDirectoryCache`
is used instead of `DefaultPersistentDirectoryStore`, this can happen
when re-using an existing cache directory that used to be accessed
using the latter but from now on will be accessed using the former.
For instance, when adding a cleanup action, `DefaultCacheFactory` will
no longer return a plain store but a Ccache.
The missing properties file will now be ignored when the cache is not
using any properties. Otherwise, it will cause the cache to be
re-initialized, i.e. all contained files will be deleted.
In addition, this commit fixes a `NullPointerException` that occurred
when a property was present in the cache's new properties but missing
in the existing cache.properties file.
18 May 18 b8612d7e2075b6daeb8552d575e30d215d0a1b94
Detangle PersistentCache cleanup action dependencies
- Introduce a new CleanupAction
- Decorate CleanupActions via CleanupActionFactory
- Remove the special case for keeping .part files
- Ask PersistentCache for "reserved" files, these files should never be cleaned up
- Reduce the number of build operations produced when cleaning a PersistentCache
Signed-off-by: Sterling Greene <firstname.lastname@example.org>
05 Dec 17 08c2d6f0c02c50f1db8f8d6358dcf719560f7ccd