# Shared cache without commiting

**URL:** <https://discuss.dvc.org/t/shared-cache-without-commiting/100>\
**Category:** Questions\
**Created:** [September 25, 2018, 1:34pm UTC](https://discuss.dvc.org/t/shared-cache-without-commiting/100 "2018-09-25T13:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ynop](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@ynop](https://discuss.dvc.org/u/ynop)\
**Post date:** [September 25, 2018, 1:34pm UTC](https://discuss.dvc.org/t/shared-cache-without-commiting/100/1 "2018-09-25T13:34:45Z")

</div>

Hi

As far as i understand, when I setup a shared cache directory, I have to commit it and others also have to use it.  
Is there a way that I can define a shared cache dir for me only?

Use Cases:

- I have a project, where I want to run jobs from two branches simultaneously. So I need to clone the repo twice, but only want the cache to exist once.
- I have projects with similar data dependencies and I want to share the cache between both projects.

Is it possible or do you have any other recommendations for my use cases?

Thanks and Regards  
Matthias

---

<div class="post-metadata">

**Author:** ![kupruser](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kupruser](https://discuss.dvc.org/u/kupruser)\
**Post date:** [September 25, 2018, 1:54pm UTC](https://discuss.dvc.org/t/shared-cache-without-commiting/100/2 "2018-09-25T13:54:29Z")

</div>

Hi @ynop !

Sure, it is possible and it is no different from what you would use when working with colleagues like described in this [article](https://dvc.org/doc/use-cases/multiple-data-scientists-on-a-single-machine) . You can also specify the same shared directory for multiple different projects just as you’ve described in your use case.

Thanks,  
Ruslan

---

<div class="post-metadata">

**Author:** ![ynop](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@ynop](https://discuss.dvc.org/u/ynop)\
**Post date:** [September 25, 2018, 2:02pm UTC](https://discuss.dvc.org/t/shared-cache-without-commiting/100/3 "2018-09-25T14:02:55Z")

</div>

Thanks for the prompt reply!

But is it also possible to define the shared cache folder without exposing it to my colleagues via git?

Since I want to share my cache for multiple projects, but my colleagues may using an other directory on another machine.

---

<div class="post-metadata">

**Author:** ![kupruser](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kupruser](https://discuss.dvc.org/u/kupruser)\
**Post date:** [September 25, 2018, 2:06pm UTC](https://discuss.dvc.org/t/shared-cache-without-commiting/100/4 "2018-09-25T14:06:59Z")

</div>

Sure. There is a local config that is designed specifically for such cases of private configs. It is not tracked by git and has priority over regular config. To use your local config, just add `--local` flag to your `dvc config` commands and it will write to `.dvc/config.local` instead of `.dvc/config`.
