Where Does sccache Keep Its Cache?
sccache keeps its disk cache in the OS cache folder by default, moved anywhere with SCCACHE_DIR when needed.
Last updated
sccache caches compiled objects on disk so repeat builds skip work they already did. The location defaults to the OS cache area, and the SCCACHE_DIR environment variable moves it anywhere you like. Server mode shares one cache across invocations on the same machine.
Defaults have shifted across releases, so check your own install before scripting around it. Cloud and Redis backends ignore the disk path entirely once configured. For local disk caching, one folder holds everything, which makes backup a non issue and cleanup trivial.
Where sccache stores this, by platform
~/.cache/sccache
Default disk location on most distros. SCCACHE_DIR overrides it fully. Run with --show-config to confirm the active path on your machine.
~/Library/Caches/Mozilla.sccache
Mozilla-flavored cache path from sccache origins. SCCACHE_DIR overrides it the same way. Exact leaf folder has varied by release, so verify with --show-config.
%LOCALAPPDATA%\Mozilla\sccache\cache
LocalAppData default for the disk backend. SCCACHE_DIR moves it to faster or larger drives. Stop the server before deleting anything inside.
Frequently asked questions
How do I confirm which cache my sccache uses?
Run sccache with --show-config to print the active cache location and backend. Stats come from --show-stats instead. Trust that output over any guide when the two disagree.
How do I clear the sccache cache safely?
Stop the server first with sccache --stop-server, then clear the folder contents. The cache rebuilds on the next compile. Never wipe it mid build, since running jobs may hold files open.
Notice an outdated path? Let us know.