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

Support some form of "read only cache" or "centralized cache"

Open ramblingenzyme opened this issue 1 year ago • 4 comments

Description: @actions/cache now ships @actions/cache/save and @actions/cache/restore actions to easily implement different caching strategies. One of the strategies they document is "Make cache read only / Reuse cache from centralized job", where you only restore in jobs.

Justification: It'd be nice to support this caching strategy / others in the future in this action natively to allow users to easily adopt or test strategies without having to opt out of this action's caching and implementing them themself.

Are you willing to submit a PR? If I can find time

ramblingenzyme avatar Oct 28 '24 00:10 ramblingenzyme

Hello @ramblingenzyme đź‘‹, Thank you for reporting this feature request. We will investigate it and get back to you as soon as we have some feedback.

priya-kinthali avatar Oct 28 '24 05:10 priya-kinthali

This would be nice, I have a couple of workflows running on self hosted runners that should be allowed to consume cache, but ideally I'd like to avoid the post action as it takes long and is not needed on those specific workflows.

wouterds avatar Dec 12 '24 15:12 wouterds

@priya-kinthali I would be up to implement this change.
Is it fine to move forward with it?

fabioatcorreia avatar May 15 '25 13:05 fabioatcorreia

Hi Everyone, thank you for your detailed feature request and for outlining the benefits of supporting read-only or centralized caching natively in setup-node.

At this time, we've reviewed the proposal but found limited community demand. Given that the existing functionality in @actions/cache already supports these strategies—such as read-only or centralized restore logic. we recommend continuing to use those patterns directly for now.

We'll keep an eye on future interest and reconsider if broader community support emerges. Thanks again for your thoughtful suggestion! Please feel free to reach us in case of any concerns/clarifications :)

aparnajyothi-y avatar Jul 31 '25 08:07 aparnajyothi-y