Clean up least recently used entries in external resources file store
The files in the external resources file store cache are now
automatically cleaned up based on a least recently used strategy. The
structure in the cache is as follows:
- hash 1 (*)
- hash 2 (*)
The cache now keeps track of files accessed inside the marked hash
directories. The cleanup action then deletes all such files that have
not been accessed in the last 30 days.
23 May 18 c0b50956d2e93986d5dee3feab6f02819cf5482d
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