tool cache とは何か?
tool cache は、CI runner 上にあるディレクトリで、Node、Python、Go などの言語やツールの展開済みですぐ使えるバージョンを保持します。setup action はまずここを見て、ダウンロードや展開をする代わりに一致するバージョンをパスに追加します。要求されたバージョンが既に存在する場合、toolchain のセットアップをほぼ瞬時にします。
なぜ重要か
job のたびにランタイムをダウンロードして展開すると、避けられる秒や minutes が加算されます。tool cache が満たされていれば、セットアップはパスの編集で済みます。マネージド runner では、よく使うバージョンをイメージに焼き込んでおくことで tool cache が温まった状態に保たれ、job はダウンロードを完全にスキップできます。
関連ガイド
What Is the Hosted Tool Cache?The hosted tool cache is the preinstalled set of tool versions baked into a hosted runner image, exposed thro…
What Is a Setup Action?A setup action installs and configures a specific language or tool version on a runner, putting it on the pat…
What Is an Action Cache?An action cache stores files keyed by a string so later workflow runs can restore dependencies or build outpu…