Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Handle missing

Prior to this commit, the check whether initialization is required

threw a `FileNotFoundException` when 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 file.

  1. … 1 more file in changeset.
Clean up least recently used entries in artifact transforms cache

The files in the transforms cache are now automatically cleaned up based

on a least recently used strategy. The structure in the cache is as


- files-1.1

- artifact-a

- hash 1 (*)

- hash 1.1

- ...

- hash 2 (*)

- ...

- ...

- metadata-1.1

The cache now keeps track of files accessed inside the first hash (*)

level by touching the corresponding directory. The cleanup action then

deletes all such directories that have not been accessed in the last 7


Issue: #1085

    • -0
    • +44
  1. … 7 more files in changeset.
Prevent creatig byte array copies when hashing hash codes

Should reduce garbage creation a little.

  1. … 8 more files in changeset.
Use logical equality to determine whether a cached value needs to be updated.

  1. … 2 more files in changeset.
Use age-based strategy to clean local build cache

Signed-off-by: Lóránt Pintér <>

  1. … 12 more files in changeset.
Clean up partial files after errors and during GC

Previously '.part' files were left behind after local cache failures, because we expected they would be useful in debugging these cases. That never happened, so we are now removing them even if there's an error, and also during garbage collection.

Signed-off-by: Lóránt Pintér <>

  1. … 5 more files in changeset.
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 <>

  1. … 19 more files in changeset.
Add coverage for cleaning up VCS checkouts

Signed-off-by: Sterling Greene <>

  1. … 2 more files in changeset.
Add persistent cache cleanup action that deletes files older than a given age

Signed-off-by: Sterling Greene <>

    • -0
    • +71
    • -0
    • +72
  1. … 5 more files in changeset.
Use our own hashing architecture, take 2 (#2817)

This replaces Guava's hashing. We need this for two reasons:

- it allows the addition of custom hash functions, like BLAKE2b which would not be possible with Guava's closed design

- it fixes a few performance issues that Guava only fixes in version 20 (which we can't upgrade to right now, because we still need to support Java 5 in places)

  1. … 159 more files in changeset.
Restart timer if the lock owner changes

If many processes fight and wait for the same lock, the timeout in one

process could be triggered, because it is "last in line". All the times

others hold the lock are added up for the timeout.

This change resets the timeout as soon as the lock owner changes.

  1. … 2 more files in changeset.
Provide an empty contended action instead of null

This contention handling is already active for exclusive locks, but

without an action it is ignoring requests from other parties.

With this, it sends confirmation that the request was received

and that lock releasing is in progress. Although the release itself

is not performed by the contended action, but manually after the

lock is no longer needed (which is the contract for exclusive locks).

    • -4
    • +4
  1. … 1 more file in changeset.
Start whenContented action before waiting for the lock

The action is now also responsible for receiving confirmation that the

lock is in the process of being released.

    • -44
    • +71
  1. … 3 more files in changeset.
Fix classycle issue

+review REVIEW-6562

  1. … 5 more files in changeset.
Move org.gradle.api.internal.cache to persistent-cache project

+review REVIEW-6562

    • -0
    • +46
  1. … 85 more files in changeset.
Move org.gradle.cache.internal to persistent-cache project

+review REVIEW-6562

    • -0
    • +545
    • -0
    • +201
    • -0
    • +729
    • -0
    • +223
    • -0
    • +150
    • -0
    • +126
    • -0
    • +93
    • -0
    • +55
    • -0
    • +282
    • -0
    • +58
    • -0
    • +290
    • -0
    • +61
    • -0
    • +123
    • -0
    • +40
    • -0
    • +99
  1. … 170 more files in changeset.
Only send ping for lock release once

  1. … 5 more files in changeset.
Improve block pointer error handling

Don't throw a vanilla IllegalArgumentException, but

a CacheCorruptedException. This ensures that the layers

further up can discard the cache and recreate the value.

    • -0
    • +30
  1. … 1 more file in changeset.