# Improve sccache cache reuse \(\#60968\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c75b287a0eb1ee2337c535cf3e82a6d1e5515c56)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c75b287a0eb1ee2337c535cf3e82a6d1e5515c56

Requested commit: c75b287a0eb1ee2337c535cf3e82a6d1e5515c56

Commit: c75b287a0eb1ee2337c535cf3e82a6d1e5515c56

Tree: 93f9f8e8cf141a22f9cdccfd1dedbaa64a084b33

Author: Yossi Eliaz

Committer: GitHub

## Message

```
Improve sccache cache reuse (#60968)

## Summary

- Upgrade sccache from 0.10.0 to 0.16.0 on macOS, Linux, and Windows CI
runners.
- Normalize the GitHub workspace with `SCCACHE_BASEDIRS` so identical
builds can reuse cache entries across checkout roots.
- Validate the cached binary version and stop an older server before
replacing it, including on Windows where a running executable cannot be
overwritten.

## Why

The setup scripts configured `SCCACHE_BASEDIR`, which sccache did not
use for cache-key path normalization. Absolute checkout paths therefore
remained part of cache keys and reduced reuse between CI workspaces.
sccache 0.16.0 supports `SCCACHE_BASEDIRS` and includes the Windows
path-normalization fix needed for the Windows runner.

## Validation

- `bash -n script/setup-sccache`
- `git diff --check`
- Upgraded a live local sccache 0.15.0 server to 0.16.0 through the
setup script.
- Compiled identical C sources from two checkout roots and observed one
cache miss followed by one cache hit.
- Confirmed that every release asset referenced by the setup scripts
exists for the supported CI runner targets.

Release Notes:

- N/A
```

## Parents

- [91fdd55889ab286b3e0712b44e784cbb852b9c0b](https://git.cafe/gitcafe/zed/commit/91fdd55889ab286b3e0712b44e784cbb852b9c0b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c75b287a0eb1ee2337c535cf3e82a6d1e5515c56?format=markdown)
