Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "Read-Only" cache access #267

Closed
alsutton opened this issue Dec 21, 2021 · 3 comments
Closed

Allow "Read-Only" cache access #267

alsutton opened this issue Dec 21, 2021 · 3 comments
Labels
feature request New feature or request to improve the current logic

Comments

@alsutton
Copy link

alsutton commented Dec 21, 2021

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+%.

Are you willing to submit a PR?
Yup. Done.

@alsutton alsutton added feature request New feature or request to improve the current logic needs triage labels Dec 21, 2021
@dmitry-shibanov
Copy link
Contributor

Hello @alsutton. We'll investigate the issue.

@alsutton
Copy link
Author

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants