# Install ccache on Windows

**URL:** <https://travis-ci.community/t/install-ccache-on-windows/10134>\
**Category:** Windows\
**Created:** [October 10, 2020, 3:16pm UTC](https://travis-ci.community/t/install-ccache-on-windows/10134 "2020-10-10T15:16:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimklimov](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jimklimov/32/5300_2.png) [@jimklimov](https://travis-ci.community/u/jimklimov)\
**Post date:** [October 10, 2020, 3:16pm UTC](https://travis-ci.community/t/install-ccache-on-windows/10134/1 "2020-10-10T15:16:27Z")

</div>

According to [https://ccache.dev/platform-compiler-language-support.html](https://ccache.dev/platform-compiler-language-support.html) there is growing support for Windows in ccache. It may be spotty for Visual Studio compilers, but I guess should be better for clang and gcc (BTW also not listed in [https://docs.travis-ci.com/user/reference/windows/](https://docs.travis-ci.com/user/reference/windows/) as available in the worker).

There are both official builds at [https://ccache.dev/download.html](https://ccache.dev/download.html) and Chocolatey packages at [https://chocolatey.org/packages/ccache](https://chocolatey.org/packages/ccache)

This should probably cover also automated caching back of the object files, with CCACHE\_DIR preferably also resolving to “$HOME/.ccache” as it defaults on Linux/Unix systems.

Overall, sounds exciting to have more test targets available from the common ecosystem! Thanks!

---

<div class="post-metadata">

**Author:** ![tanzislam](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/tanzislam/32/2591_2.png) [@tanzislam](https://travis-ci.community/u/tanzislam)\
**Post date:** [October 12, 2020, 9:13am UTC](https://travis-ci.community/t/install-ccache-on-windows/10134/2 "2020-10-12T09:13:07Z")

</div>

So is this a request to simply include the `ccache` Chocolatey package in the Windows image, or to have a plugin/add-on that will (in addition to instaling `ccache`) implicitly configure the build cache settings?

---

<div class="post-metadata">

**Author:** ![randombit](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/randombit/32/3223_2.png) [@randombit](https://travis-ci.community/u/randombit)\
**Post date:** [October 28, 2020, 9:33am UTC](https://travis-ci.community/t/install-ccache-on-windows/10134/3 "2020-10-28T09:33:37Z")

</div>

Another good option for a ccache-like tool on Windows is [https://github.com/mozilla/sccache](https://github.com/mozilla/sccache) which works with MSVC as well as gcc/clang.

---

<div class="post-metadata">

**Author:** ![jimklimov](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jimklimov/32/5300_2.png) [@jimklimov](https://travis-ci.community/u/jimklimov)\
**Post date:** [October 28, 2020, 11:58pm UTC](https://travis-ci.community/t/install-ccache-on-windows/10134/4 "2020-10-28T23:58:43Z")

</div>

I would prefer to keep things simple (for FOSS projects that already know how to use ccache when it is available - e.g. when there is no symlink named same as the chosen compiler, which happens a lot when picking non-default versions, rather than introducing another tool that sources would have to add support for).

I am not sure what the “implicit configuration” encompasses? Is it the creation of a `%HOME%/.ccache` directory and an optional config file there? Automatic entry for stashing the cache between builds? Or something more complicated?

I suppose for starters, including the package in Windows image would suffice; so at least projects that know how to choose the compiler they want, wrapped or not by ccache, can do so out of the box.

Thanks,  
Jim
