Task runnerConceptsRemote Caching

Remote Caching

Share cache across machines with Turborepo-compatible HTTP protocol

Remote Caching

Remote caching allows team members and CI machines to share cached task results. The task runner implements the Turborepo v8 artifacts protocol, making it compatible with Vercel Remote Cache and self-hosted alternatives.

Configuration

const results = await defaultTaskRunner(tasks, {
    remoteCache: {
        url: "https://cache.example.com",
        token: process.env.CACHE_TOKEN,
        teamId: "my-team",
        read: true,   // Enable remote reads (default)
        write: true,  // Enable remote writes (default)
    },
}, context);

How It Works

  1. Local miss - Task hash not found in local cache
  2. Remote check - GET /v8/artifacts/{hash} with bearer token
  3. Remote hit - Download artifact, store locally, replay result
  4. Remote miss - Execute task normally
  5. Upload - PUT /v8/artifacts/{hash} (fire-and-forget, non-blocking)

Environment Variables

You can also configure via environment variables (compatible with Turborepo):

TURBO_API=https://cache.example.com
TURBO_TEAM=my-team
TURBO_TOKEN=your-auth-token

Self-Hosted Options

Any server implementing the Turborepo v8 artifacts API works:

Protocol

PUT /v8/artifacts/{hash}?teamId={team}  → Upload cached artifact
GET /v8/artifacts/{hash}?teamId={team}  → Download cached artifact
POST /v8/artifacts/events               → Analytics (optional)

Headers:
  Authorization: Bearer {token}
  Content-Type: application/octet-stream
Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues