Gradle / subprojects / persistent-cache / src / test / groovy / org / gradle / cache / internal
DefaultPersistentDirectoryStoreConcurrencyTest.groovy
![]() |
![]() |
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. |
![]() |
Got a suggestion or an issue?
Discuss it on the Atlassian Community or
visit Atlassian Support for other options.