# Cargo cache doesn't seem to work as expected

**URL:** <https://travis-ci.community/t/cargo-cache-doesnt-seem-to-work-as-expected/1204>\
**Category:** Windows\
**Tags:** rust\
**Created:** [December 4, 2018, 10:48am UTC](https://travis-ci.community/t/cargo-cache-doesnt-seem-to-work-as-expected/1204 "2018-12-04T10:48:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![upsuper](https://avatars.discourse-cdn.com/v4/letter/u/b5ac83/32.png) [@upsuper](https://travis-ci.community/u/upsuper)\
**Post date:** [December 4, 2018, 10:48am UTC](https://travis-ci.community/t/cargo-cache-doesnt-seem-to-work-as-expected/1204/1 "2018-12-04T10:48:30Z")

</div>

See for example this build: [https://travis-ci.org/upsuper/telegram-rustevalbot/jobs/463234472](https://travis-ci.org/upsuper/telegram-rustevalbot/jobs/463234472)

All dependencies are downloaded again (but not built, since they are all fresh).

From the log, it seems that `/c/Users/travis/.cargo` is added to the cache, not sure why it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![FrederickZh](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/frederickzh/32/4797_2.png) [@FrederickZh](https://travis-ci.community/u/FrederickZh)\
**Post date:** [June 18, 2020, 9:58am UTC](https://travis-ci.community/t/cargo-cache-doesnt-seem-to-work-as-expected/1204/2 "2020-06-18T09:58:21Z")

</div>

I know this is a reeeeeeeeally late reply but it seems `cargo` cache simply doesn’t work for Windows.

So what one can do is something like:

```auto
cache:
  cargo: true
  directories:
    - $HOME/AppData/Local/Temp/chocolatey
    - /C/tools/msys64
    - /C/Users/travis/.cargo/registry
    - /C/Users/travis/.cache/sccache
    - target

```
