Caching
Magic Cache serves actions/cache, Docker and build tool caches from an S3 bucket in your VPC. Sticky disks and ECR registries cover the rest.
RunsOn Magic Cache switches the GitHub Actions cache backend to an S3 bucket in your own AWS account. You keep actions/cache, the setup actions and Docker’s type=gha exactly as they are, and since v3.6.0 the same backend serves build tools, git checkouts and apt packages.
Compared with GitHub’s cache#
| Magic Cache | GitHub Actions cache | |
|---|---|---|
| Size | No cap | 10 GB per repository included, more is billed |
| When a budget runs out | Saves keep working, billed to your AWS account | The cache becomes read-only ↗ |
| Expiry | 10 days after a save by default, configurable | After 7 days unused, or sooner when the repository is full |
| 50 GB kept for 10 days | $0.38–$0.42 of S3 storage | $0.93, once an owner raises the repository’s capacity |
| Where entries live | Your VPC and S3 bucket | GitHub |
The GitHub Actions cache FAQ has the pricing details, and the cache benchmark measures restore speed.
What do you want to cache?#
RunsOn has three ways to cache. Start with Magic Cache: it is the cheapest, needs the least setup, and every job and branch shares it.
| You cache | Magic Cache (S3) | Sticky disk (EBS) | Registry (ECR) |
|---|---|---|---|
actions/cache and setup actions | GitHub Actions cache | Toolchain directories | |
| Docker layers | type=gha | Persistent BuildKit state | type=registry |
| Build tool outputs | Turborepo, Nx, Gradle, Go, sccache, Bazel and mbx | Build directories | |
| Git checkouts | Git checkout cache | Git mirror | |
| Ubuntu and Debian packages | apt package cache | ||
| Actions used by the workflow | Action downloads, always on | ||
| Docker Hub and public images | Docker Hub pull-through | ||
| Images shared between jobs | Ephemeral registry | ||
| Best when | Almost always: shared by every job and branch, read while jobs run | A cache too large or too slow to pack into archives, reused by the same lineage | Images pushed by one job and pulled by others, or pulled from Docker Hub |
| Cost | S3 storage, 10 days by default | A live EBS volume per job, plus snapshots | ECR storage, 10 days |
How it works covers what every Magic Cache page relies on: enabling it, the build tool setup, retention, and how scopes and cache isolation apply.
Other ways to keep work between jobs#
Other ways to make builds faster#
Older options, such as the runs-on/cache and runs-on/snapshot actions, are on Legacy.