# How to use caching in circleci

**URL:** <https://discuss.circleci.com/t/how-to-use-caching-in-circleci/27413>\
**Category:** Build Environment\
**Tags:** circle-yml\
**Created:** [January 3, 2019, 10:51am UTC](https://discuss.circleci.com/t/how-to-use-caching-in-circleci/27413 "2019-01-03T10:51:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samimideksa](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@samimideksa](https://discuss.circleci.com/u/samimideksa)\
**Post date:** [January 3, 2019, 10:51am UTC](https://discuss.circleci.com/t/how-to-use-caching-in-circleci/27413/1 "2019-01-03T10:51:41Z")

</div>

version: 2  
jobs:  
build:  
docker:  
- image: allinone:latest  
steps:  
- checkout  
- restore\_cache:  
key: -v3-{{ checksum “requirements.txt”}}  
- run:  
name: Install Requests  
command: python3.6 -m pip install requests  
- run:  
name: Get Models  
command: git clone [https://github.com/circulosmeos/gdown.pl](https://github.com/circulosmeos/gdown.pl) && cd gdown.pl && ./gdown.pl [https://drive.google.com/file/d/11v9D6lyMhTlzGPMXTia\_iUzv-3AdEGK5/view?usp=sharing](https://drive.google.com/file/d/11v9D6lyMhTlzGPMXTia_iUzv-3AdEGK5/view?usp=sharing) model.tar.xz && tar xvf model.tar.xz && cd model  
- run:  
name: install GRPC  
command: python3.6 -m pip install grpcio grpcio-tools  
- run:  
name: Generate GRPC files  
command: cd grpc && python3.6 -m grpc\_tools.protoc -I. --python\_out=. --grpc\_python\_out=. grpc/all\_in\_one.proto  
- run:  
name: Run Tests  
command: python3.6 -m unittest test\_rpc\_call.TestSuiteGrpc  
- save\_cache:  
paths:  
- null  
key: -v3-{{checksum “requirements.txt”}}

workflows:  
version: 2  
build\_and\_test:  
jobs:  
- build  
I have this circleci file in my config.yml and I want to store cache in a file named requirements.txt Every time I run circleci local execute --job build it is running from scratch all the commands but I want to use cache like docker build how can I do that?

---

<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:** [April 3, 2019, 10:51am UTC](https://discuss.circleci.com/t/how-to-use-caching-in-circleci/27413/2 "2019-04-03T10:51:42Z")

</div>

Closed on April 3, 2019, 10:51am UTC

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