Build Cache now uses compressed cache storage for Xcode and Bazel

Description

Cache entries are stored compressed, which cuts storage and network traffic and lets more of your cache fit in the same quota.

  • Xcode: Starting with Build Cache CLI v3.18.0, Xcode cache entries are compressed before they leave your build machine. This is on by default and needs no configuration changes.
  • Bazel: Compressed uploads are now stored as they arrive and sent back without compressing them again. Entries that were already stored uncompressed are compressed the first time they’re read. This is on by default for Remote Build Execution (RBE). For the Bazel remote cache, add --remote_cache_compression to your .bazelrc (Bazel 7+).

Highlights:

Xcode

  • Around 4x less cache storage: Compressed Xcode uploads now take about a quarter of the space. For example, across all compressed Xcode uploads on 3 Nov, total storage dropped from 1.11 TB to 0.27 TB.
  • Much less upload traffic per build: Based on data from 30 organizations, 28 uploaded more than 20% less data per build, and the median organization uploaded about 4x less. Among the 10 next-largest Xcode workspaces, 8 uploaded 2.2x to 5.1x less.
  • No change to cache correctness: Cache entries are still verified on download as before. Across 32 organizations, overall cache hit rate changed by less than 1 percentage point (−0.9 pp), which is within normal day-to-day variation.
  • Especially helpful with tight cache quotas: Smaller cache entries mean more of your Xcode cache can fit into the same quota, which can reduce eviction pressure for workspaces that are near their limits.
  • Enabled automatically: No setup is required. Compression is on by default for Xcode builds using Build Cache CLI v3.18.0+.

Bazel

  • Up to 4.3x less data moved for RBE: For some customers, RBE workers now download and upload up to 4.3x fewer bytes.
  • Up to 4x more cache entries in the same quota: Some customers’ caches now hold about 4x as many entries within the same quota. Workspaces near their quota keep results for much longer before they’re evicted.
  • 75–95% fewer misses caused by eviction: Some customers saw 75–95% fewer cache misses caused by results being deleted to make room.
  • Helps remote-cache-only workspaces too: With --remote_cache_compression, Bazel workspaces that don’t use RBE store their entries up to 1.8x smaller and see fewer misses caused by eviction.
  • No change to cache correctness: Compressed entries are still checked against their size and checksum on download. Batch uploads are now also checked against their digest before they’re stored.
  • Easy to enable: RBE needs no changes. For the remote cache, add --remote_cache_compression to your .bazelrc.

Why This Matters

For many teams, cache storage and upload volume make up a large part of Build Cache usage. Compressing cache entries reduces both storage and network traffic without changing cache correctness. Teams with tighter quotas benefit the most, because smaller entries help keep more useful cache data available for reuse. For Bazel, that means caches keep much more history, so more builds hit the cache instead of rebuilding.

Bottom line: Build Cache now stores Xcode and Bazel cache entries much more efficiently. Xcode gets this by default with Build Cache CLI v3.18.0+, RBE gets it automatically, and the Bazel remote cache needs one flag.