# Circle ci downloads dependencies every time even with cache enabled

**URL:** <https://discuss.circleci.com/t/circle-ci-downloads-dependencies-every-time-even-with-cache-enabled/24010>\
**Category:** Mobile\
**Tags:** 2.0\
**Created:** [August 2, 2018, 1:26pm UTC](https://discuss.circleci.com/t/circle-ci-downloads-dependencies-every-time-even-with-cache-enabled/24010 "2018-08-02T13:26:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alouanemed](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/alouanemed/32/16120_2.png) [@alouanemed](https://discuss.circleci.com/u/alouanemed)\
**Post date:** [August 2, 2018, 1:26pm UTC](https://discuss.circleci.com/t/circle-ci-downloads-dependencies-every-time-even-with-cache-enabled/24010/1 "2018-08-02T13:26:30Z")

</div>

Every time Circle Ci 2 run a build, Gradle downloads the dependencies even if the cache is enabled.

Does anyone have a clue on this on how to prevent it from downloading it each time? Thanks

 ![Untitled](https://global.discourse-cdn.com/circleci/original/3X/9/c/9cdd58d5c94d299956e92fc1f67d3e4b77b844d3.png)

full config file : [https://gist.github.com/alouanemed/2b8ce7a154663ffd8b422f1b75748b4f](https://gist.github.com/alouanemed/2b8ce7a154663ffd8b422f1b75748b4f)

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [August 2, 2018, 2:47pm UTC](https://discuss.circleci.com/t/circle-ci-downloads-dependencies-every-time-even-with-cache-enabled/24010/2 "2018-08-02T14:47:42Z")

</div>

Have a look at the CircleCI cache system in the docs. You define a key, which is usually a checksum of your dependencies specification file, and you specify what path is to be cached.

I don’t use Gradle, but this should download everything _in situ_ such that when you do the next install, Gradle connects to its repo but realises there is nothing to do, and exits early.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 31, 2018, 2:47pm UTC](https://discuss.circleci.com/t/circle-ci-downloads-dependencies-every-time-even-with-cache-enabled/24010/3 "2018-10-31T14:47:56Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
