# Chef-client Cookbook on Windows: Cache location

**URL:** <https://discourse.chef.io/t/chef-client-cookbook-on-windows-cache-location/16650>\
**Category:** Chef Infra (archive)\
**Created:** [February 7, 2020, 11:48am UTC](https://discourse.chef.io/t/chef-client-cookbook-on-windows-cache-location/16650 "2020-02-07T11:48:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave12345](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@dave12345](https://discourse.chef.io/u/dave12345)\
**Post date:** [February 7, 2020, 11:48am UTC](https://discourse.chef.io/t/chef-client-cookbook-on-windows-cache-location/16650/1 "2020-02-07T11:48:53Z")

</div>

Hi,

Re: chef-client-15.5.17-1-x64 and chef-client supermarket cookbook 11.4.0 on Windows Server 2012 x64

I'm using the the chef-client cookbook and its "config" recipe to template the client.rb file.

I notice that C:/chef/cache attribute that was there has been removed in the client.rb file post change and the scheduled task command options doesn't reference it either ...

However when a chef run starts it knows where the cache is. I'd like to understand how this works as investigating if moving cache off the C drive is valid.

many thanks and have a great weekend.

David

---

<div class="post-metadata">

**Author:** ![bobchaos](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@bobchaos](https://discourse.chef.io/u/bobchaos)\
**Post date:** [February 14, 2020, 5:40pm UTC](https://discourse.chef.io/t/chef-client-cookbook-on-windows-cache-location/16650/2 "2020-02-14T17:40:23Z")

</div>

The cache is simply another parameter (`cache_path`) you can pass in. You can add it to client.rb or as a CLI parameter. This defaults to `C:/chef/cache` on windows. If you're curious about the details you can look at this:

> <https://github.com/chef/chef/blob/5a9f64b83e4605ee4d23190a3afcf08b000e3da1/chef-config/lib/chef-config/config.rb#L324>

The chef-client cookbook appears to handle it via this attribute: `default['chef_client']['file_cache_path'] = "#{node['chef_client']['conf_dir']}/cache"`
