Description
We fixed an issue that could prevent ccache reuse in builds that install toolchains like the Android NDK during the build, and we added new ccache visibility to the build log.
Highlights:
- Fixed unstable ccache keys: The Build Cache CLI now sets
CCACHE_COMPILERCHECK=content, so ccache hashes the compiler binary contents instead of its mtime. This prevents cache keys from rotating when a byte-identical toolchain is reinstalled with a new timestamp. - Affects extracted toolchains, not stack-provided compilers: This issue only affected builds where the toolchain is installed or extracted during the build, such as NDK installs via
sdkmanager, CMake, or custom toolchains. Stack-provided compilers were never affected. - New ccache stats in the build log: The CLI now prints a per-invocation summary like
Ccache stats: hits: N (bytes) / total: M (P%). Uploaded: X, making it much easier to see whether your native cache is healthy. - Warning for write-only behavior: If a build only writes to the cache and does not read from it, the CLI now emits a warning so the problem is visible directly in the logs.
- More transparency for storage issues: The ccache summary now also includes remote storage error and timeout information when relevant.
What shipped
This fix was released in:
- Build Cache CLI v3.6.1 β adds ccache statistics and write-only warnings to the logs
- Build Cache CLI v3.6.2 β fixes compiler checks by setting
CCACHE_COMPILERCHECK=content
Delivered through these Step versions:
activate-build-cache-for-gradle3.4.2activate-build-cache-for-xcode0.20.2activate-build-cache-for-react-native0.14.2activate-gradle-mirrors0.6.2
What customers should expect
- One-time re-key after upgrade: The first build after upgrading will upload a fresh cache and read little or nothing back. Reuse should begin on the next build.
- Per-datacenter warmup still applies: Build Cache storage is still scoped by datacenter, so each datacenter pays that one-time warmup cost separately.
- How to verify the fix: Check your build log for the
Ccache stats:line. If you still see 0% hits with a largeUploadedvalue after warmup, your cache may still be rotating.
Why This Matters
Before this fix, some native builds could silently behave like write-only caches: uploading large amounts of data every build while reusing almost none of it. This release fixes that specific key instability and makes ccache health visible in the logs, so customers can both benefit from the fix and verify it more easily.
Bottom line: If your builds install toolchains like the Android NDK during execution, update to the latest Build Cache Step version to restore ccache reuse and use the new Ccache stats: log line to confirm itβs working.