mirror of
https://github.com/gradle/actions.git
synced 2026-01-25 17:26:10 +08:00
Cache Gradle distributions downloaded for a particular version (#58)
- Cache is separate from (but similar to) the wrapper distribution cache - New 'distributions-cache-enabled' flag controls caching of all downloaded distributions (including wrapper distributions) - Deprecated the 'wrapper-cache-enabled' flag for removal in v2
This commit is contained in:
10
README.md
10
README.md
@@ -122,22 +122,24 @@ jobs:
|
||||
|
||||
This action provides 3 levels of caching to help speed up your GitHub Actions:
|
||||
|
||||
- `wrapper` caches the local [wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) installation, saving time downloading and unpacking Gradle distributions ;
|
||||
- `distributions` caches any downloaded Gradle zips, including any downloaded [wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) versions, saving time downloading Gradle distributions ;
|
||||
- `dependencies` caches the [dependencies](https://docs.gradle.org/current/userguide/dependency_resolution.html#sub:cache_copy), saving time downloading dependencies ;
|
||||
- `configuration` caches the [build configuration](https://docs.gradle.org/nightly/userguide/configuration_cache.html), saving time configuring the build.
|
||||
|
||||
Only the first one, caching the wrapper installation, is enabled by default.
|
||||
Only the first one, caching downloaded distributions, is enabled by default.
|
||||
Future versions of this action will enable all caching by default.
|
||||
|
||||
You can control which level is enabled as follows:
|
||||
|
||||
```yaml
|
||||
wrapper-cache-enabled: true
|
||||
distributions-cache-enabled: true
|
||||
dependencies-cache-enabled: true
|
||||
configuration-cache-enabled: true
|
||||
```
|
||||
|
||||
The wrapper installation cache is simple and can't be configured further.
|
||||
NOTE: The `wrapper-cache-enabled` flag has been deprecated, replaced by `distributions-cache-enabled` which enables caching for all downloaded distributions, including Gradle wrapper downloads.
|
||||
|
||||
The distributions cache is simple and can't be configured further.
|
||||
|
||||
The dependencies and configuration cache will compute a cache key in a best effort manner.
|
||||
Keep reading to learn how to better control how they work.
|
||||
|
||||
Reference in New Issue
Block a user