GitHub Actions cache · artifacts · Turborepo

Your CI cache, in your own Cloudflare account

Stock actions/cache and upload-artifact cache through CacheFlow with no workflow changes, and Turborepo with one setup step. Add a trusted-consumer policy and your release jobs restore only what a trusted build produced.

A cache you own, trust and can see into

Own it

Your account, your bytes

CacheFlow runs on your Cloudflare account, so cache and artifact bytes never sit with a third party and the resources show up on your own Cloudflare bill.

  • Artifact bytes in R2, with no egress fees
  • Key ownership in D1, a fast read path in KV, in-flight sessions in Durable Objects
  • One deployment serves the Actions cache, Actions artifacts and the Turborepo remote cache

Trust it

Restore only what a trusted build saved

Entries saved with a GitHub OIDC token, as the CacheFlow actions do, record the event, ref, commit and workflow behind them. Add a trusted-consumer policy and your release jobs restore only entries a push, schedule or manual run saved on your protected branch.

  • Short-lived credentials only: GitHub OIDC for the CacheFlow actions, GitHub’s own runtime token for drop-in jobs
  • Each branch writes only its own scope and reads through its base and the default branch
  • On OIDC jobs, saves from events outsiders can trigger on a protected branch, such as pull_request_target, are quarantined; drop-in jobs follow GitHub’s own cache grant

See it

Know your hit rate

Every Actions cache and artifact restore, miss and save is recorded with its bytes, as are Turborepo downloads and uploads, including whether a restore matched its exact key or fell back to a prefix.

  • Actions cache keys and artifact names are recorded only as a keyed hash, never as written
  • Sessions buffer writes from parallel matrix jobs and commit them atomically
  • Stale sessions are cleaned up when builds finish or time out

Start where you already are

Four ways in, from zero changes to full control. Most teams begin with the first and never edit a workflow.

  1. Zero changes

    Keep the workflows you have

    Point your runners at CacheFlow once. Stock actions/cache, setup-node, Swatinem/rust-cache and upload-artifact then cache through it, untouched. On GitHub-hosted runners the same workflow falls back to GitHub’s cache.

    # runner environment: set once, per runner pool
    ACTIONS_RESULTS_URL=https://cache.cacheflow.sh/
    
    # your workflows: unchanged
    - uses: actions/cache@v4
    - uses: Swatinem/rust-cache@v2
    - uses: actions/upload-artifact@v4
  2. One step

    Stop rebuilding what Turborepo already built

    Add setup-cacheflow and every task whose inputs have not changed replays its outputs instead of running again, across jobs, branches and repositories.

    See the full workflow ↓
  3. Release-grade

    Ship only what a trusted build produced

    Save release and deploy caches through the CacheFlow actions. Each entry records the event, ref, commit and workflow behind it. Add a trusted-consumer policy, and your release jobs restore only entries a push, schedule or manual run saved on your protected branch.

    # the job needs permissions: { contents: read, id-token: write }
    - uses: CaptainEmpower/cacheflow/.github/actions/cache/save@v1
      with:
        path: dist
        key: release-${{ github.sha }}
        cache-url: ${{ vars.CACHEFLOW_CACHE_URL }}
    
    # Rust: the rust-cache fork, same attestation
    - uses: CaptainEmpower/rust-cache@v2-cacheflow
      with:
        cache-provider: cacheflow
  4. Any tool

    Cache anything from the command line

    The cacheflow CLI and Python SDK store and restore any artifact from any build tool. Sessions buffer writes from parallel matrix jobs and commit them atomically, so no job overwrites another.

    # In a GitHub Actions step after setup-cacheflow, which exports
    # CACHEFLOW_CACHE_URL, CACHEFLOW_TOKEN, CACHEFLOW_TENANT,
    # CACHEFLOW_REPOSITORY and CACHEFLOW_BRANCH (export them yourself
    # elsewhere). GITHUB_SHA is set by Actions.
    cacheflow cache namespace ci-build   # idempotent
    SESSION=$(cacheflow session start --namespace ci-build)
    cacheflow cache put ci-build "dist-$GITHUB_SHA" dist.tar.gz \
      --session "$SESSION"
    cacheflow session commit --namespace ci-build \
      --session "$SESSION" --status success
    cacheflow cache get ci-build "dist-$GITHUB_SHA" --out dist.tar.gz

Weighing the alternatives? See how CacheFlow compares with GitHub’s Actions cache, Vercel Remote Cache and CI runner vendors’ caches.

Turborepo remote cache in one step

setup-cacheflow mints a short-lived OIDC credential and exports TURBO_API, TURBO_TOKEN and TURBO_TEAM. No stored secrets:

permissions:
  contents: read
  id-token: write

jobs:
  build:
    runs-on: ${{ vars.CI_RUNNER_LARGE || vars.CI_RUNNER_DEFAULT }}
    steps:
      - uses: actions/checkout@v4
      # exports TURBO_API, TURBO_TOKEN and TURBO_TEAM
      - uses: CaptainEmpower/cacheflow/.github/actions/setup-cacheflow@v1
        with:
          api-url: ${{ vars.CACHEFLOW_TURBO_API }}
          install-cli: 'false'
      - run: pnpm install --frozen-lockfile
      - run: pnpm turbo run build

Questions teams ask first

Do we have to change our workflows?
Not for the Actions cache and artifacts. Point your runners’ environment at CacheFlow once, and stock actions/cache, setup-node, Swatinem/rust-cache and upload-artifact use it unchanged. On GitHub-hosted runners the same workflows keep using GitHub’s cache. The Turborepo remote cache takes one setup-cacheflow step per workflow.
Where does our data live?
In your Cloudflare account: bytes in R2, key ownership in D1, a read path in KV and in-flight sessions in Durable Objects. Telemetry records Actions cache keys and artifact names only as a keyed hash. We are also planning a managed plan, run by CacheFlow for you.
What does it cost?
The Cloudflare resources CacheFlow uses are billed to your own Cloudflare account, and R2 charges no egress fees. We will share pricing for CacheFlow itself with early-access teams.
Is it faster than GitHub’s cache?
We make no speed claim. Bytes come from Cloudflare R2 over the internet, and we have not measured a restore-speed advantage. If you need a cache next to the runner, a runner vendor’s cache may suit you better.
How do jobs authenticate?
Jobs using the CacheFlow actions or setup-cacheflow exchange a short-lived GitHub OIDC token. Drop-in jobs on stock actions use the runtime token GitHub already gives every job. Either way, no long-lived secret is stored in your pipelines. Other CI systems and developer laptops use a token issued by your operator.
Can we switch back?
Yes. CacheFlow speaks the protocols your tools already use: the Actions cache and artifact services and the Turborepo remote cache. Remove the runner setting or the setup-cacheflow step, and your workflows go back to the cache they used before.

Get early access

Join the waitlist and we'll reach out when your team can onboard.