7b6d4a8Use ProgressLogger so cache cleanup is visible
f88446fAvoid reinitializing DefaultPersistentDirectoryStores
Prior to this commit, adding a `CleanupAction` when building a `PersistentCache` using `CacheBuilder.withCleanup()` caused the used implementation class to be changed from `DefaultPersistentDirectoryStore` to `DefaultPersistentDirectoryCache`. The latter adds initialization logic and has a very strict check in place that verifies whether the lock file has been unlocked cleanly. If not, it will delete all files in the cache in order to reinitialize it. Since the mere addition of a cleanup action should not change such a fundamental behavior, this commit moves the cleanup logic to the `DefaultPersistentDirectoryStore` class and instantiates it when a cleanup action is configured but no initialization related properties. |
![]() |