# Configurable cache upload policy for Xcode Compilation Cache

**URL:** https://community.tuist.dev/t/configurable-cache-upload-policy-for-xcode-compilation-cache/888
**Category:** General
**Created:** [February 5, 2026, 5:56pm UTC](https://community.tuist.dev/t/configurable-cache-upload-policy-for-xcode-compilation-cache/888 "2026-02-05T17:56:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![marekfort](https://community.tuist.dev/user_avatar/community.tuist.dev/marekfort/32/8_2.png) [@marekfort](https://community.tuist.dev/u/marekfort)
#### Post date: [February 5, 2026, 5:56pm UTC](https://community.tuist.dev/t/configurable-cache-upload-policy-for-xcode-compilation-cache/888/1 "2026-02-05T17:56:11Z")

</div>

# Configurable cache upload policy for Xcode Compilation Cache

We just shipped a new feature for the Xcode Compilation Cache: **configurable upload policy**. You can now control whether your local cache service uploads artifacts to the remote cache or operates in read-only mode.

## Why this matters

Until now, every machine using the Xcode Compilation Cache both downloaded and uploaded artifacts. This works well for CI, but **uploading from local machines slows down local builds** and the artifacts produced during incremental local builds are frequently never reused by anyone else. You’re paying the upload cost for no benefit.

By restricting uploads to CI only, local builds stay fast (download-only) while CI populates the remote cache with the artifacts the rest of the team actually needs.

## How it works

A new `cache` option in your `Tuist.swift` file lets you control the upload behavior:

### Disable uploads entirely

```swift
import ProjectDescription

let tuist = Tuist(
    fullHandle: "your-org/your-project",
    cache: .cache(
        upload: false
    ),
    project: .tuist(
        generationOptions: .options(
            enableCaching: true
        )
    )
)

```

With `upload: false`, the local proxy will still **download** cached artifacts from the remote cache, but it will never **upload** new ones. Your builds still get faster from cache hits without contributing potentially unreliable artifacts back.

**NOTE:** When changing the value of `upload`, you need to re-run `tuist setup cache` for the new value to take effect.

### Upload only from CI

If you want to restrict uploads to CI only, we added `Environment.isCI` to make this easy:

```swift
import ProjectDescription

let tuist = Tuist(
    fullHandle: "your-org/your-project",
    cache: .cache(
        upload: Environment.isCI
    ),
    project: .tuist(
        generationOptions: .options(
            enableCaching: true
        )
    )
)

```

`Environment.isCI` checks for the `CI` environment variable that most CI providers (GitHub Actions, CircleCI, Bitrise, etc.) set automatically. On CI, artifacts get uploaded. On developer machines, they don’t.

## Build analytics

When uploads are disabled, the upload-related CAS outputs are automatically filtered from build analytics in `tuist inspect build`. This means your dashboard accurately reflects actual uploads rather than showing skipped operations.

## Getting started

This feature is available starting with [Tuist 4.139.0](https://github.com/tuist/tuist/releases/tag/4.139.0). Update your CLI and add the `cache` option to your `Tuist.swift`. No migration is needed, the default behavior (`upload: true`) is unchanged, so existing setups continue to work as before.

We’d love to hear how this works for your team. If you have questions or feedback, drop them in this thread!

---

<div class="post-metadata">

### Author: ![shahzadmajeed](https://community.tuist.dev/user_avatar/community.tuist.dev/shahzadmajeed/32/6_2.png) [@shahzadmajeed](https://community.tuist.dev/u/shahzadmajeed)
#### Post date: [February 5, 2026, 6:06pm UTC](https://community.tuist.dev/t/configurable-cache-upload-policy-for-xcode-compilation-cache/888/2 "2026-02-05T18:06:46Z")

</div>

Definitely a good step
