quickstart →

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.

How it works
Your AWS account everything stays in it
your VPC
EC2 runner, one per job
actions/cache your step, unchanged
RunsOn sidecar started by the agent
S3 cache bucket no size cap, your retention
GitHub's cache 10 GB per repository never called
Restores and saves take the same path. The CloudFormation stack's VPC has an S3 gateway endpoint; in your own VPC (Terraform), add one so cache traffic stays off a NAT gateway.
2.4–3.0× faster
4 GB restores against GitHub-hosted, cache benchmark →
unlimited
no 10 gb cap — evicts on your policy
$0 transfer
through the VPC's S3 gateway endpoint

Compared with GitHub’s cache#

Magic CacheGitHub Actions cache
SizeNo cap10 GB per repository included, more is billed
When a budget runs outSaves keep working, billed to your AWS accountThe cache becomes read-only ↗
Expiry10 days after a save by default, configurableAfter 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 liveYour VPC and S3 bucketGitHub

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 cacheMagic Cache (S3)Sticky disk (EBS)Registry (ECR)
actions/cache and setup actionsGitHub Actions cacheToolchain directories
Docker layerstype=ghaPersistent BuildKit statetype=registry
Build tool outputsTurborepo, Nx, Gradle, Go, sccache, Bazel and mbxBuild directories
Git checkoutsGit checkout cacheGit mirror
Ubuntu and Debian packagesapt package cache
Actions used by the workflowAction downloads, always on
Docker Hub and public imagesDocker Hub pull-through
Images shared between jobsEphemeral registry
Best whenAlmost always: shared by every job and branch, read while jobs runA cache too large or too slow to pack into archives, reused by the same lineageImages pushed by one job and pulled by others, or pulled from Docker Hub
CostS3 storage, 10 days by defaultA live EBS volume per job, plus snapshotsECR 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.