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
Description:
When working on a pull request a lot of the code changes are turbulent and should be recompiled on each run, so it would be useful to allow users to pass a "with" setting which would indicate whether the results of the run should be cached (e.g. in the case of runs against the main branch), or dropped (e.g. in the case of runs against a PR).
Justification:
This would reduce the workflow completion times significantly for some runs (e.g. our PR checks are 2-3min of runtime, of which 1 min can be spent updating the cache). If we could say "Don't update the cache after this run", it would reduce our PR check runtimes by 30+%.
Thanks, I've made a tweak to the PR to allow the cache to be used in read-only, write-only, or both modes. I put this in after noticing my cache carrying forward some unneeded build dependencies.
Hello @alsutton . Thank you for your report. We would not like to implement such kind of logic, because the initial caching logic for setup-java should cover the most often use cases. If you want to use some more complex caching logic we would recommend you to use actions/cache.
Activity
dmitry-shibanov commentedon Dec 23, 2021
Hello @alsutton. We'll investigate the issue.
alsutton commentedon Dec 23, 2021
Thanks, I've made a tweak to the PR to allow the cache to be used in read-only, write-only, or both modes. I put this in after noticing my cache carrying forward some unneeded build dependencies.
e-korolevskii commentedon Jun 8, 2022
Hello @alsutton . Thank you for your report. We would not like to implement such kind of logic, because the initial caching logic for setup-java should cover the most often use cases. If you want to use some more complex caching logic we would recommend you to use actions/cache.
For now I'm closing the issue.