Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Include Gradle invocation arguments in cache keys #68

@bigdaz

Description

@bigdaz

When an exact match for a cache key is found, then any changes to the cache entry will not be persisted after the job completes. With the existing cache key algorithm, can result in inefficient use of caching.

Consider this example:

  1. A job runs gradle help, and caches the dependencies with the key dependencies-<hash>
  2. A subsequent job runs gradle test and gets an exact-match hit with the key dependencies-<hash>. This job will download many additional dependencies, but due to the exact match on cache key, the updated cache entry will not be saved.
  3. Any subsequent gradle test job will have to re-download all dependencies

The Gradle invocation arguments should be included in the cache key, so that the cache lookup pattern will be:

  1. dependencies-<arguments>-<hash>
  2. dependencies-<arguments>-
  3. dependencies-

A similar change should be made for the configuration-cache key.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions