sccache とは何か?
sccache は、コンパイラの呼び出しをラップし、その入力のハッシュを計算して、同じ入力が以前にコンパイルされていれば保存された出力を返す compiler cache ツールです。純粋にローカルな cache とは異なり、共有のクラウドオブジェクトストレージにエントリを保存できるため、cache はマシンや CI 実行をまたいで再利用されます。複数のコンパイラと言語をサポートします。
なぜ重要か
CI runner は通常クリーンな状態で始まるため、ローカルのみの cache は毎回空です。共有バックエンドがあれば、ある runner が別の runner のすでに行ったコンパイル作業を再利用できます。これにより繰り返しの完全コンパイルが cache hit に変わり、build 分数とコストが削減されます。cache の正しさは、入力のハッシュが出力に影響するすべてを捕捉することにかかっています。
関連ガイド
What Is ccache?ccache is a compiler cache for C and C++ that speeds rebuilds by reusing the output of earlier compilations o…
What Is a Compiler Cache?A compiler cache stores the output of compiling a translation unit keyed on its inputs, so an identical compi…
What Is a Remote Cache Backend?A remote cache backend is shared storage where build and test caches live so many machines and CI runs can re…