[INDEX] // ALL_DOCS ›
[TOC] // ON_THIS_PAGE ›
Closed beta
The Machine Actions cache is a closed beta. It is not available to every team yet, and its behaviour and limits may change before general availability. Interested? Email support@machine.dev with your GitHub organization and the workflows you would like to speed up.
Machine runners can serve GitHub Actions caching from a cache that lives in the same AWS region as the runner, instead of GitHub’s hosted cache. Restores and saves move over the regional network rather than the public internet, so large caches (dependencies, build outputs, model weights) restore faster.
No workflow changes
Once the beta is enabled for your team, the cache works with the actions you already use:
actions/cache(v4 and later),actions/cache/restoreandactions/cache/save- Every toolkit-based cache built on them, such as
actions/setup-node,actions/setup-python,actions/setup-goandastral-sh/setup-uvwith caching turned on
We verified the 20 most common caching setups end to end. Every one restored a cache hit from the Machine cache, with no workflow changes:
| Ecosystem | Verified |
|---|---|
| JavaScript | npm, Yarn, pnpm |
| Python | pip, Poetry, Pipenv, uv |
| Go | actions/setup-go |
| Java | Maven, Gradle, gradle/actions/setup-gradle |
| Rust | Swatinem/rust-cache, sccache |
| C / C++ | ccache |
| Ruby | Bundler (ruby/setup-ruby) |
| .NET | NuGet |
| PHP | Composer |
| Docker | BuildKit cache-to/cache-from: type=gha |
| Other | actions/cache, pre-commit |
Keep your existing key and restore-keys. Restore order follows GitHub’s rules: exact key first, then each restore key, within the scopes GitHub allows for the run.
Every job prints which cache it is using near the top of its log:
Machine cache: enabled (us-east-1, ...)
Performance
On a 4-vCPU Machine runner the cache restores at 420–530 MB/s and saves at 640–740 MB/s. GitHub’s cache on GitHub-hosted runners restores at 120–190 MB/s and saves at about 310 MB/s.
Machine cache on a Machine runner, compared with GitHub’s cache on a GitHub-hosted runner. Times are for the cache step, in seconds; lower is better.
| Workload | Size | Save: GitHub | Save: Machine | Restore: GitHub | Restore: Machine | Restore speed-up |
|---|---|---|---|---|---|---|
| Random data | 268 MB | 3.2 s | 1.7 s | 5.1 s | 1.3 s | 3.9× |
| Random data | 1.1 GB | 8.9 s | 3.7 s | 14.9 s | 4.0 s | 3.8× |
| Random data | 4.3 GB | 45.9 s | 10.5 s | 80.3 s | 13.1 s | 6.1× |
pip install torch cache | 3.0 GB | 33.2 s | 21.8 s | 53.5 s | 9.9 s | 5.4× |
| Hugging Face model | 773 MB | 7.9 s | 3.4 s | 12.9 s | 3.2 s | 4.0× |
npm install cache | 122 MB | 3.4 s | 1.4 s | 1.5 s | 1.2 s | 1.2× |
Turning it on
After we open the beta to your team, a team admin turns it on in Settings → Cache. The setting applies to runners launched after the change.
To keep a single job on GitHub’s cache, add cache=false to its runner label:
runs-on: machine/cpu=8/cache=false
How it works
- Region-locked. An entry saved by a runner in a region is stored in that region and is only restored by runners in the same region. Nothing is copied between regions, so a job that lands in a different region starts with a cache miss.
- Scoped to your repository. Each runner gets short-lived credentials that can only reach your team’s and repository’s cache. Runners never talk to Machine’s API to use it.
- Branch rules match GitHub’s. A job can only save into its own branch’s scope. Restores can use entries from the same branch and the branches GitHub allows (for example, the default branch).
- Never fails your job. If the cache cannot be reached, cache calls are answered as misses and the job carries on. An enabled runner does not fall back to GitHub’s cache, and its log says which cache it got.
Sharing across branches
Off by default. A team admin can turn on Share cache across branches in Settings → Cache. A restore that misses every normal scope may then use an entry saved by any other branch of the same repository in the same region. Entries saved by pull-request runs are never shared this way.
Who can read your cache
Like GitHub’s cache, any job in the repository, including pull requests from forks, can restore the repository’s cache entries. Do not put secrets in cached paths.
Retention and limits
| Storage | 25 GiB per repository, per region |
| Eviction | Least recently used entries are removed when a repository goes over its limit in a region |
| Age expiry | None. An entry stays until it is evicted or you purge it |
| Entry size | A single entry larger than 25 GiB is not saved |
Team admins can purge a repository’s cache from Settings → Cache.
Pricing
Cache storage and transfer are not billed during the closed beta. You pay only for runner time, as usual.
Get access
Email support@machine.dev with your GitHub organization, the regions you run in, and the workflows you would like to speed up.