You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup-gradle.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -218,7 +218,7 @@ Using either of these mechanisms may interfere with the caching provided by this
218
218
219
219
The GitHub Actions cache has some properties that present problems for efficient caching of the Gradle User Home.
220
220
- Immutable entries: once a cache entry is written for a key, it cannot be overwritten or changed.
221
-
- Branch scope: cache entries written for a Git branch are not visible from actions running against different branches. Entries written for the default branch are visible to all. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
221
+
- Branch scope: cache entries written for a Git branch are not visible from actions running against different branches or tags. Entries written for the default branch are visible to all. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
222
222
- Restore keys: if no exact match is found, a set of partial keys can be provided that will match by cache key prefix. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
223
223
224
224
Each of these properties has influenced the design and implementation of the caching in `setup-gradle`, as described below.
@@ -316,8 +316,8 @@ Some techniques can be used to avoid/mitigate this issue:
316
316
317
317
### Select which branches should write to the cache
318
318
319
-
GitHub cache entries are not shared between builds on different branches.
320
-
Workflow runs can restore caches created in either the current branch or the default branch (usually main).
319
+
GitHub cache entries are not shared between builds on different branches or tags.
320
+
Workflow runs can _only_ restore caches created in either the same branch or the default branch (usually `main`).
321
321
This means that each branch will have its own Gradle User Home cache scope, and will not benefit from cache entries written for other (non-default) branches.
322
322
323
323
By default, The `setup-gradle` action will only _write_ to the cache for builds run on the default (`master`/`main`) branch.
0 commit comments