Skip to content

Allow "Read-Only" cache access #267

Closed

Description

@alsutton

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.

Activity

  1. dmitry-shibanov commented on Dec 23, 2021

    @dmitry-shibanov
    Contributor

    Hello @alsutton. We'll investigate the issue.

  2. alsutton commented on Dec 23, 2021

    @alsutton
    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.

  3. e-korolevskii commented on Jun 8, 2022

    @e-korolevskii
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions