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

Description
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:
- A job runs
gradle help, and caches the dependencies with the key dependencies-<hash>
- 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.
- 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:
dependencies-<arguments>-<hash>
dependencies-<arguments>-
dependencies-
A similar change should be made for the configuration-cache key.