Title: Gradle cache increases by 400 MB every time updating Gradle wrapper version · Issue #269 · actions/setup-java · GitHub
Open Graph Title: Gradle cache increases by 400 MB every time updating Gradle wrapper version · Issue #269 · actions/setup-java
X Title: Gradle cache increases by 400 MB every time updating Gradle wrapper version · Issue #269 · actions/setup-java
Description: Description: When updating the Gradle wrapper to a new version (changed gradle-wrapper.properties), then setup-java@v2 first restores the gradle cache from previous run (why??) new Gradle version is downloaded and build then setup-java@v...
Open Graph Description: Description: When updating the Gradle wrapper to a new version (changed gradle-wrapper.properties), then setup-java@v2 first restores the gradle cache from previous run (why??) new Gradle version i...
X Description: Description: When updating the Gradle wrapper to a new version (changed gradle-wrapper.properties), then setup-java@v2 first restores the gradle cache from previous run (why??) new Gradle version i...
Opengraph URL: https://github.com/actions/setup-java/issues/269
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Gradle cache increases by 400 MB every time updating Gradle wrapper version","articleBody":"**Description:**\r\nWhen updating the Gradle wrapper to a new version (changed `gradle-wrapper.properties`), then\r\n1. setup-java@v2 first restores the gradle cache from **previous run** (why??)\r\n2. new Gradle version is downloaded and build\r\n3. then setup-java@v2 creates a new cache file (~800 MB) which is about 400 MB larger than before because it contains two Gradle versions\r\n\r\nChanging Gradle wrapper version again increases the cache file size by 400 MB to 1200 MB, and so on...\r\n\r\nHere is a run where it happened: https://github.com/JFormDesigner/FlatLaf/runs/4705134891\r\n\r\nIn \"Setup Java 17\" the outdated cache is restored (https://github.com/JFormDesigner/FlatLaf/runs/4705134891#step:4:35):\r\n~~~\r\nCache Size: ~425 MB (445413982 B)\r\n/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/19b74bcf-0264-4065-b1ef-448c93c2d4fc/cache.tzst -P -C /home/runner/work/FlatLaf/FlatLaf\r\nCache restored successfully\r\nCache restored from key: setup-java-Linux-gradle-707ed6f8250ea8ec2ee660640962308e354fe354d36338715ef1bcab4fcc837f\r\n~~~\r\n\r\nIn \"Post Setup Java 17\" a new cache with ~836 MB is created (https://github.com/JFormDesigner/FlatLaf/runs/4705134891#step:11:5):\r\n~~~\r\nCache Size: ~836 MB (876885346 B)\r\nCache saved successfully\r\nCache saved with the key: setup-java-Linux-gradle-af7e537f7a03362010edc6596ab7fba05bdfb901982028cbd2d21e5291cd932d\r\n~~~\r\n\r\nNote the different hash keys in the cache file names!\r\n\r\n\r\n**Task version:**\r\nactions/checkout@v2\r\n\r\n**Platform:**\r\n- [x] Ubuntu\r\n- [ ] macOS\r\n- [x] Windows\r\n\r\n**Runner type:**\r\n- [x] Hosted\r\n- [ ] Self-hosted\r\n\r\n**Repro steps:** \r\nSee above description.\r\n\r\n**Expected behavior:**\r\nWhen changing `gradle-wrapper.properties` (or `build.gradle`), then the cache should be not restored.\r\n\r\n**Actual behavior:**\r\nCache is restored even if `gradle-wrapper.properties` (or `build.gradle`) changed, which increases the size of the cache file by aboud 400 MB every time a new Gradle wrapper version is used.","author":{"url":"https://github.com/DevCharly","@type":"Person","name":"DevCharly"},"datePublished":"2022-01-04T17:39:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/269/setup-java/issues/269"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:55cc6e38-6039-5691-fc42-58bd01cbf937 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A98E:2D857A:10C6DCA:16B66CD:6A533A10 |
| html-safe-nonce | 02cf86cb4264d8bac1b91ed337e75f9a1dc876e241c8af82ad5d1dd8cef7edf0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOThFOjJEODU3QToxMEM2RENBOjE2QjY2Q0Q6NkE1MzNBMTAiLCJ2aXNpdG9yX2lkIjoiMzcxOTQ2MjA3NjkxOTUyNzk1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d9ce756d0db4ce7637f10dec07b81e2a84e5efe1607c74eeee3dadba8341d331 |
| hovercard-subject-tag | issue:1093608722 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-java/269/issue_layout |
| twitter:image | https://opengraph.githubassets.com/47a3ef905c8a1125236b88d6971bf760ec620063c59f641e28d6652602bddef1/actions/setup-java/issues/269 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/47a3ef905c8a1125236b88d6971bf760ec620063c59f641e28d6652602bddef1/actions/setup-java/issues/269 |
| og:image:alt | Description: When updating the Gradle wrapper to a new version (changed gradle-wrapper.properties), then setup-java@v2 first restores the gradle cache from previous run (why??) new Gradle version i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DevCharly |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-java git https://github.com/actions/setup-java.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 196057608 |
| octolytics-dimension-repository_nwo | actions/setup-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 196057608 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width