Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Initial steps towards a 2-stage dependency cache

This commit introduces the infrastructure required to get a 2-stage

dependency cache, consisting of a read-only, shareable cache and

a read-write local mutable cache.

The read-only cache would typically be mounted on Docker images.

Only infrastructure, no tests yet.

    • -3
    • +1
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 82 more files in changeset.
Introduce a checksum file cache service

This service is responsible for caching the checksums computed from

local file system. Because it's also used for dependency verification

writing and checking, this cache uses the existing infrastructure which

makes sure that if a file is updated locally, we expire the entry in

the cache.

This is done because there are lots of places in the code where we

used the legacy `HashUtil` class, which has no caching whatsoever.

It's, however, quite common to have a build which generates sha1

checksums multiple times for the same file. For example, during

publication.

    • -2
    • +2
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -3
    • +3
    ./local/CompositeLocallyAvailableResourceFinderTest.groovy
    • -8
    • +9
    ./local/LazyLocallyAvailableResourceCandidatesTest.groovy
    • -11
    • +13
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 99 more files in changeset.
Introduce a checksum file cache service

This service is responsible for caching the checksums computed from

local file system. Because it's also used for dependency verification

writing and checking, this cache uses the existing infrastructure which

makes sure that if a file is updated locally, we expire the entry in

the cache.

This is done because there are lots of places in the code where we

used the legacy `HashUtil` class, which has no caching whatsoever.

It's, however, quite common to have a build which generates sha1

checksums multiple times for the same file. For example, during

publication.

    • -2
    • +2
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -3
    • +3
    ./local/CompositeLocallyAvailableResourceFinderTest.groovy
    • -8
    • +9
    ./local/LazyLocallyAvailableResourceCandidatesTest.groovy
    • -11
    • +13
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 99 more files in changeset.
Introduce a checksum file cache service

This service is responsible for caching the checksums computed from

local file system. Because it's also used for dependency verification

writing and checking, this cache uses the existing infrastructure which

makes sure that if a file is updated locally, we expire the entry in

the cache.

This is done because there are lots of places in the code where we

used the legacy `HashUtil` class, which has no caching whatsoever.

It's, however, quite common to have a build which generates sha1

checksums multiple times for the same file. For example, during

publication.

    • -2
    • +2
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -3
    • +3
    ./local/CompositeLocallyAvailableResourceFinderTest.groovy
    • -8
    • +9
    ./local/LazyLocallyAvailableResourceCandidatesTest.groovy
    • -11
    • +13
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 99 more files in changeset.
Introduce a checksum file cache service

This service is responsible for caching the checksums computed from

local file system. Because it's also used for dependency verification

writing and checking, this cache uses the existing infrastructure which

makes sure that if a file is updated locally, we expire the entry in

the cache.

This is done because there are lots of places in the code where we

used the legacy `HashUtil` class, which has no caching whatsoever.

It's, however, quite common to have a build which generates sha1

checksums multiple times for the same file. For example, during

publication.

    • -2
    • +2
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -3
    • +3
    ./local/CompositeLocallyAvailableResourceFinderTest.groovy
    • -8
    • +9
    ./local/LazyLocallyAvailableResourceCandidatesTest.groovy
    • -11
    • +13
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 100 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -0
    • +64
    ./cached/DefaultCachedExternalResourceIndexTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -0
    • +64
    ./cached/DefaultCachedExternalResourceIndexTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -0
    • +64
    ./cached/DefaultCachedExternalResourceIndexTest.groovy
  1. … 9 more files in changeset.
Update module cache content

Reference to file are now relative to the root of the module cache

instead of being absolute.

This should allow moving the full module cache around to be reused with

a different root path.

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 7 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -0
    • +64
    ./cached/DefaultCachedExternalResourceIndexTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
No more absolute path in metadata cache

Reference to file are now relative to the root of the module cache

instead of being absolute.

This allows moving the full module cache around to be reused with

a different root path.

The path are also normalized, so that they are portable across systems

where the name separator changes.

Issue #1338

    • -1
    • +1
    ./cached/DefaultArtifactResolutionCacheTest.groovy
  1. … 9 more files in changeset.
Remove usage of Factory from DefaultFileSystemSnapshotter

Using a Supplier does not require any Gradle base services types.

    • -2
    • +2
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 6 more files in changeset.
Remove verbose logging of downloads and JAR generation

Artifact downloads and Gradle JAR generation were emitting

logging headers, flooding the console on builds with cold

caches. Headers should only be used by operations that group

some other progress, like tasks and project configuration.

    • -1
    • +0
    ./transfer/ProgressLoggingExternalResourceUploaderTest.groovy
  1. … 11 more files in changeset.
Rename to ArtifactCacheLockingManager

The name CacheLockingManager suggested it was used to manage locking of

caches in general instead of just for the artifacts cache.

Resolves gradle/gradle-private#1338.

    • -2
    • +2
    ./cached/AbstractCachedIndexTest.groovy
    • -2
    • +2
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -2
    • +2
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 26 more files in changeset.
Improve test readability

    • -1
    • +1
    ./cached/AbstractCachedIndexTest.groovy
  1. … 2 more files in changeset.
Add convenience method to track access to single file

    • -3
    • +1
    ./cached/AbstractCachedIndexTest.groovy
  1. … 8 more files in changeset.
Track file access in AbstractCachedIndex

Instead of tracking access in DefaultCacheAwareExternalResourceAccessor

and CachingModuleComponentRepository this is now done in

AbstractCachedIndex which ensures it's done always when reading from

indexes of CachedItems and only does so when not already present in an

in-memory cache from a previous lookup.

    • -0
    • +126
    ./cached/AbstractCachedIndexTest.groovy
    • -18
    • +5
    ./cached/DefaultArtifactResolutionCacheTest.groovy
    • -23
    • +2
    ./transfer/DefaultCacheAwareExternalResourceAccessorTest.groovy
  1. … 37 more files in changeset.