Skip to content

Struo cache

Struo can reuse results locally, but a developer's local cache does not reach their teammates or a fresh CI worker. Tuist provides a shared remote cache so matching work only needs to run on one machine.

Setup#

Complete Get started with Struo, then check the cache binding in your repository's struo.toml:

toml
[infrastructures.tuist]
kind = "tuist"
account = "acme"
project = "app"
[infrastructure.cache]
provider = "tuist"

Authenticate with struo auth login --provider tuist. No Tuist executable or additional cache plugin is required. The same provider supports cacheable scripts and graph targets.

Only work declared cacheable by Struo can be reused. Declare the inputs, outputs, and environment the work depends on; configuring a remote cache does not make an arbitrary command reproducible.

Verify shared reuse#

Run the same cacheable script or graph target on two machines with matching inputs and configuration:

bash
struo build MyApplication

The first machine populates the shared cache. On a second machine whose local cache has not seen that result, a hit and restored outputs confirm remote reuse. Repeating the command on the first machine alone can demonstrate a local hit, not that Tuist supplied the result.

Inspect cache activity#

Open Struo Cache in your Tuist project to inspect action-cache hits, transfers, latency, and throughput. Open a run's Cache view to inspect its reported action decisions and content-object activity.

Action results and content objects answer different questions: a missing action result means Struo must do the work, while a content-object request transfers an input or output. Do not treat a blob download as an executed action or an action-cache hit.

For the run's action graph and structured errors, see Struo build insights.

Continuous integration#

Use TUIST_TOKEN or Struo's headless OIDC login, as described in Struo on continuous integration. Keep credentials out of struo.toml.

The account's cache upload policy determines who can publish results. A read-only developer can consume CI-produced entries without becoming a cache writer.

See Struo's Tuist integration for connection retries and troubleshooting. Retries do not make interrupted uploads resumable.