Skip to content
  • BoringCache
  • CI caching

Why I built BoringCache

I started with a slow Ruby install on an old MacBook Air. I wanted to reuse work that another machine had already done, wherever I chose to build.

Gaurav Tiwari Updated 6 min read

In July 2025, I was installing Ruby on an old MacBook Air with 16 GB of RAM. I was tinkering with a side project, and compiling Ruby was taking longer than I wanted, so I started wondering whether I needed to compile it at all. GitHub Actions had macOS runners and prebuilt Ruby versions. Could I just use one of those?

It wasn't as simple as downloading a build and running it on my laptop. The Ruby builds used by GitHub Actions embed their installation path and depend on the environment they were built for. Just because a build existed somewhere didn't mean I could use it where I needed it.

The first experiment was precompiled Ruby

My first idea was to compile Ruby, store the builds somewhere, and let other people download them. If teammates were using the same version on compatible machines, why should each person wait for the same compilation?

Looking back, it was a small problem to start a product around. I didn't install Ruby every day. But the wait bothered me enough to try, and looking through the existing builds got me thinking about the storage and computation behind them. Lots of machines were keeping copies of the same software and doing similar work. I wanted to know how much of that work we could share.

One machine compiles Ruby and saves the completed build so another compatible machine can restore it.
My first idea: if one machine had finished the work, another compatible machine should be able to reuse it.

During those experiments, I came across Dagger and used it to build my own pipeline, where I could define each step and work with its cached result. The earliest BoringCache alpha cached the work done by pipeline steps so a later run could reuse it. Installing dependencies, compiling code and building containers all produce results that can be useful again, and I got more interested in making those results available to the next build.

Caches depended on where the build ran

The caches I used were usually part of something else: a CI service, a deployment platform or a particular machine. They worked well there. The trouble started when I wanted to use the same work somewhere else. A cache that CI could read wasn't necessarily one my laptop could read, and moving to another provider could mean building it again.

I wanted to choose where to run a build without also deciding where all its reusable work had to stay. A teammate's machine, a CI runner and a deployment host might all need the same dependency or compiled output. Where that output came from mattered less than whether it was compatible with the build that needed it.

Larger machines helped, but I was still waiting

I also tried running Docker builds on remote machines, including much larger runners. They were faster, but not by as much as I'd hoped. Builds that took several minutes locally still took minutes remotely, and adding cores didn't make every part of those builds finish proportionally faster. That changed what I wanted to optimize. Before paying for more compute, I wanted to cut how much work the machine had to do: if a compatible machine had already compiled something, the next one shouldn't have to.

Other people building CI services were making the case for caching too. Blacksmith's Cache is King explains how Docker layer caching lets later builds reuse earlier work, and keeping the cache on fast storage next to the runner makes sense. I wanted a shared cache that's useful whichever company supplies the runner.

I wanted to do more with less: make better use of existing machines, avoid repeated computation and store fewer copies of the same data. That was one of the main ideas behind BoringCache, and it still guides what I work on. I sometimes wonder if I'm being too ambitious trying to match services that keep fast storage close to their runners, but I think careful engineering can make up much of that difference.

I wanted caching to be the main job

That became the reason to build BoringCache. I wanted to focus on storing, sharing and reusing build results, separate from any runner service. The cache should stay useful when the machine changes, whether the next build runs locally, on AWS, on Google Cloud or in another CI system.

The save-and-restore model in GitHub Actions influenced me a lot. I'd also worked with teams that saved files to S3 and restored them with custom scripts, and I wanted to offer the same workflow without every team writing and maintaining those scripts. That shaped BoringCache's save and restore commands. Saving a file or directory and restoring it wherever it's needed should be simple and fast, and how that feels to use mattered to me too: clear names, few steps and an interface that's easy to understand.

Cost was part of the idea from the start. Cutting repeated computation isn't worth much if storing and fetching the results gets too expensive. Object storage appealed to me because it's available almost everywhere and it let me keep the cost of storing build results separate from the cost of running builds. I wanted affordable shared storage without people having to buy their compute from me.

Speed mattered for the same reason. People use a cache to save time, and finding, downloading and preparing a cached result all count towards the wait. A cache hit only helps if reusing the result takes less time than doing the work again. I wanted to cut that overhead, including the time it takes to save work for the next build.

Built for sharing and reuse

When I talk about an open cache platform, I mean one a team can use with whatever machines and build tools it chooses. I want a useful cache to be there wherever a compatible build needs it. With Ruby, that's all I wanted: to choose my machine without losing access to a compatible build.

The same goes for storage. If several builds contain the same data, I want them to reuse what's already stored instead of each one uploading and keeping another copy. That's why BoringCache uses content-addressed storage: data is identified by its contents, so those builds can all point at the same stored copy.

The experiments began in July 2025, and I launched the first iteration of BoringCache in July 2026. I think of the wider goal as cache intelligence: helping builds reuse the work they need, when they need it, without fetching data they won't use. I want that to mean faster builds, less storage and less data transferred.