Turborepo and Vercel Remote Cache: Killing Idle CI Time

CI pipelines are the bottleneck in most modern software delivery. As development teams grow, the time spent waiting on builds, tests, and type checks compounds, slowing down the entire release process. Efficient caching—both local and shared—is the most direct way to cut that idle time. Turborepo's build system combined with Vercel Remote Cache provides this out of the box.

How Turborepo Speeds Up Your Pipeline

Turborepo is a high-performance build system designed for JavaScript and TypeScript monorepos. It focuses on fast, incremental builds and uses intelligent caching to avoid redundant work, which can reduce CI times by up to 85% for common pipelines. Because it operates at the task level, it doesn't alter your runtime code.

The system lets you define a pipeline of tasks—such as building, linting, type checking, and code generation—that can run in parallel across your workspaces. Turborepo handles the orchestration, ensuring tasks start as soon as their dependencies are met and restoring previously cached results for near-instant execution when nothing has changed.

"With Turborepo, we were able to give each workspace its own build, test, and typecheck scripts and not worry about manually managing when they execute. Turborepo’s remote caching has drastically sped up our CI runs when a code change only touches one or a few workspaces."

Spike Brehm Software Engineer

Setting Up Shared Caching in Three Minutes

Vercel Remote Cache takes the local caching benefits and makes them collaborative. Once connected, the caches you build on your workstation become instantly available to your teammates and CI systems, effectively making your caching "multiplayer."

To get started, clone the Turborepo starter:

npx create-turbo@latest

Inside the new project directory, run the authorization command:

npx turbo login

Your browser will prompt you to authorize the Turborepo CLI with Vercel. Once complete, link the project:

npx turbo link

With that setup finished, cached tasks are shared across all your development environments, including CI/CD systems linked to the same Vercel Remote Cache.

Caching in Action: From Local Build to Deployment

To see this shared cache work, start with a local build using pnpm run build. Turborepo will build the apps in the /apps directory in parallel. Running that command again will hit the local cache and finish in milliseconds.

Because you linked the project to Vercel, those local build caches are automatically available on the platform. To trigger a deployment, push the repository to your Git provider and navigate to vercel.com/new. Vercel will auto-detect the monorepo structure and pre-configure the framework, root directory, and build commands for your first app—in this case, docs—without any manual setup.

Settings to deploy a project from your Turborepo.

Clicking "Deploy" starts the build. If you inspect the build logs, you'll see messages indicating that Turborepo restored the task outputs from the Vercel Remote Cache instead of re-running the full build.

Turborepo restoring your project from the Vercel Remote Cache.

Turborepo restores the project's cached artifacts, saving the full duration of the original task run.

Measuring Your Time Savings

Turborepo records more than just outputs and logs when caching a task; it also stores the original execution time. This metadata is what makes it possible to quantify the savings. By comparing a full task run against a cache restoration, the platform can calculate exactly how much wall-clock time was reclaimed.

One week of Vercel Remote Cache usage for our team at Vercel. One week of Vercel Remote Cache usage for our team at Vercel.

For a team at Vercel, one week of Remote Cache usage shows significant time saved. Individual cache hits restore outputs in milliseconds, effectively eliminating the entire duration of the original task. These aggregated savings are visible in the "Artifacts" section of your Vercel Usage dashboard.

Extending the Remote Cache Beyond Turborepo

The integration between Turborepo and Vercel provides a zero-configuration distributed caching layer in minutes. It supports continuous updates without manual management of the caching infrastructure.

The workflow is flexible enough to fit into broader CI strategies:

The Vercel Remote Cache is available on the Hobby account for free, with a Pro trial available to evaluate its impact on team-based CI workflows.