setup-go icon indicating copy to clipboard operation
setup-go copied to clipboard

Add support for restoring from partial cache match

Open artuross opened this issue 2 years ago • 1 comments

Description: Currently, it seems that this action only restores cache if the cache key is matched exactly (go.mod and go.sum haven't changed).

Justification: Typically, when updating dependencies, only some dependencies will be updated. With current version, it means that whenever a dependency is updated, the cache is not used and therefore all packages must be fetched. In my view, this is suboptimal.

I think there should be a setting to enable this behavior.

Are you willing to submit a PR? Yes.

artuross avatar Aug 02 '23 16:08 artuross

Hello, @artuross ! Thank you for the suggestion, we will investigate it :)

dusan-trickovic avatar Aug 02 '23 20:08 dusan-trickovic