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

Configurable cache action #54

Open
aaomidi opened this issue Dec 14, 2024 · 4 comments
Open

Configurable cache action #54

aaomidi opened this issue Dec 14, 2024 · 4 comments

Comments

@aaomidi
Copy link

aaomidi commented Dec 14, 2024

GitHub's cache is great if you're using GitHub hosted runners, but the cache heavily drops off in performance when you're using something else.

There are other cache providers that are fully compatible with actions/cache, but semantically work differently. For example: https://github.com/runs-on/cache

Would it be possible to support these caches? I think two flags would make sense:

  1. the cache action label
  2. additional arguments to pass into with block
@p0deje
Copy link
Member

p0deje commented Dec 16, 2024

Unfortunately, it's not as straightforward as just replacing the actions/cache with something else. This action uses the JavaScript cache library directly so to use a different library, a new action has to be built with the library changed in package.json at the very least.

You can try forking the action and replacing @actions/cache with a runs-on library (assuming it's provided). If it proves to work, I'll see what the best way is to opt-in for a different cache library.

@aaomidi
Copy link
Author

aaomidi commented Jan 10, 2025

@p0deje I think https://github.com/actions/cache/releases/tag/v4.2.0 actually solves the problem. I think with this, I'll be able to make the cache backend configurable.

@aaomidi
Copy link
Author

aaomidi commented Jan 10, 2025

I guess its already actually in 4.0.0? https://www.npmjs.com/package/@actions/cache

@p0deje
Copy link
Member

p0deje commented Jan 10, 2025

@aaomidi How would you make the cache backend configurable? I don't see any API in https://www.npmjs.com/package/@actions/cache package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants