# \#caching

**URL:** https://discuss.circleci.com/tag/caching/65.md

[Latest](https://discuss.circleci.com/latest.md) · [Categories](https://discuss.circleci.com/categories.md) · [Tags](https://discuss.circleci.com/tags.md)

---

## [Docker layer caching on windows - buildkit](https://discuss.circleci.com/t/docker-layer-caching-on-windows-buildkit/54127)

<div class="topic-metadata">

**Author:** [@chris27uk](https://discuss.circleci.com/u/chris27uk)\
**Replies:** 0\
**Last updated:** [September 30, 2025, 3:45pm UTC](https://discuss.circleci.com/t/docker-layer-caching-on-windows-buildkit/54127 "2025-09-30T15:45:46Z")

</div>

Hi, I am attempting to build maui on windows (unfortunately it has to be on windows) and there are a significant amount of project specific dependencies that don’t really change that often but take forever to install. I…

---

## [\[Product Update\] Zstd Compression for Caches](https://discuss.circleci.com/t/product-update-zstd-compression-for-caches/53431)

<div class="topic-metadata">

**Author:** [@DomParfitt](https://discuss.circleci.com/u/DomParfitt)\
**Replies:** 0\
**Last updated:** [June 25, 2025, 9:24am UTC](https://discuss.circleci.com/t/product-update-zstd-compression-for-caches/53431 "2025-06-25T09:24:48Z")

</div>

Starting June 25th we are rolling out a change to use zstd compression rather than gzip for caches. The expectation is that this should provide a performance boost to both the save\_cache and restore\_cache steps, but othe…

---

## [Use the same cache key for jobs running in parallel?](https://discuss.circleci.com/t/use-the-same-cache-key-for-jobs-running-in-parallel/49950)

<div class="topic-metadata">

**Author:** [@ifeins](https://discuss.circleci.com/u/ifeins)\
**Replies:** 4\
**Last updated:** [May 7, 2025, 6:05pm UTC](https://discuss.circleci.com/t/use-the-same-cache-key-for-jobs-running-in-parallel/49950 "2025-05-07T18:05:06Z")

</div>

Hi, I have a project in which I want to run 3 jobs in parallel, but I want to install npm dependencies only once and cache the resulting node\_modules: test-unit - run unit tests test-integration - run integration test…

---

## [How to check cache hit status](https://discuss.circleci.com/t/how-to-check-cache-hit-status/52199)

<div class="topic-metadata">

**Author:** [@jkmathew](https://discuss.circleci.com/u/jkmathew)\
**Replies:** 0\
**Last updated:** [October 22, 2024, 12:27pm UTC](https://discuss.circleci.com/t/how-to-check-cache-hit-status/52199 "2024-10-22T12:27:07Z")

</div>

Is it possible to check the cache hit status after a cache restore step? For example, in some cases if the restore cache hit is exact we can skip some steps. I could not find any documentation reading this. Bitrise has…

---

## [DLC Teardown context deadline exceeded](https://discuss.circleci.com/t/dlc-teardown-context-deadline-exceeded/50894)

<div class="topic-metadata">

**Author:** [@Supernats](https://discuss.circleci.com/u/Supernats)\
**Replies:** 0\
**Last updated:** [May 11, 2024, 12:48am UTC](https://discuss.circleci.com/t/dlc-teardown-context-deadline-exceeded/50894 "2024-05-11T00:48:23Z")

</div>

Our jobs using Docker Layer Caching are consistently failing at teardown. Saving fails after about 11 seconds and says the context deadline has exceeded. I can find no documentation about any time cutoff for DLC saving. …

---

## [DLC teardown - control over deleting of images when over 15GB](https://discuss.circleci.com/t/dlc-teardown-control-over-deleting-of-images-when-over-15gb/48975)

<div class="topic-metadata">

**Author:** [@dan-man](https://discuss.circleci.com/u/dan-man)\
**Replies:** 4\
**Last updated:** [August 28, 2023, 8:46pm UTC](https://discuss.circleci.com/t/dlc-teardown-control-over-deleting-of-images-when-over-15gb/48975 "2023-08-28T20:46:38Z")

</div>

Context I have a job that produces both two docker images: one is ~1GB that’s used for most of our ELT logic; and a second one that’s ~14.5GB because it also includes machine learning dependencies. Although the final f…

---

## [What compression algorithm does Circle CI use for save\_cache / restore cache?](https://discuss.circleci.com/t/what-compression-algorithm-does-circle-ci-use-for-save-cache-restore-cache/49009)

<div class="topic-metadata">

**Author:** [@cjerdonek](https://discuss.circleci.com/u/cjerdonek)\
**Replies:** 1\
**Last updated:** [August 22, 2023, 8:37am UTC](https://discuss.circleci.com/t/what-compression-algorithm-does-circle-ci-use-for-save-cache-restore-cache/49009 "2023-08-22T08:37:24Z")

</div>

Hi, from both the time and disk space it takes to run save\_cache and restore\_cache on a single large file, it seems like a compression / decompression step is being run. Can you tell me what compression algorithm or comm…

---

## [Replace All Uses of yarn --frozen-lockfile With yarn --immutable --immutable-cache](https://discuss.circleci.com/t/replace-all-uses-of-yarn-frozen-lockfile-with-yarn-immutable-immutable-cache/40081)

<div class="topic-metadata">

**Author:** [@Kurt-von-Laven](https://discuss.circleci.com/u/Kurt-von-Laven)\
**Replies:** 1\
**Last updated:** [May 18, 2022, 2:52pm UTC](https://discuss.circleci.com/t/replace-all-uses-of-yarn-frozen-lockfile-with-yarn-immutable-immutable-cache/40081 "2022-05-18T14:52:17Z")

</div>

The default yarn install command of the CircleCI node orb uses the deprecated flag --frozen-lockfile causing yarn to warn: ➤ YN0050: The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache in…

---

## [Bundler / Ruby caching dependencies](https://discuss.circleci.com/t/bundler-ruby-caching-dependencies/36898)

<div class="topic-metadata">

**Author:** [@wyardley](https://discuss.circleci.com/u/wyardley)\
**Replies:** 2\
**Last updated:** [January 14, 2022, 5:10pm UTC](https://discuss.circleci.com/t/bundler-ruby-caching-dependencies/36898 "2022-01-14T17:10:59Z")

</div>

Looking at https://circleci.com/docs/2.0/caching/#bundler-ruby and https://discuss.circleci.com/t/partial-cache-restoration-bundler/24783/3 I’m trying to follow the recommendation to run a bundle cache clean --force bef…

---

## [Re-implemented the ability to "Bust Cache" in cirlceci 2.1 workflows](https://discuss.circleci.com/t/re-implemented-the-ability-to-bust-cache-in-cirlceci-2-1-workflows/42472)

<div class="topic-metadata">

**Author:** [@unlikelyzero](https://discuss.circleci.com/u/unlikelyzero)\
**Replies:** 0\
**Last updated:** [January 4, 2022, 11:24pm UTC](https://discuss.circleci.com/t/re-implemented-the-ability-to-bust-cache-in-cirlceci-2-1-workflows/42472 "2022-01-04T23:24:26Z")

</div>

I don’t know where else to put this, but my team had a very specific reason for needing Cache Busting which was removed from CircleCI 2.X. Make a Runtime Parameter openmct/config.yml at 86e5d10fc172e5a3c9627df5371cd6326…

---

## [CircleCi caching of python dependencies not working](https://discuss.circleci.com/t/circleci-caching-of-python-dependencies-not-working/34816)

<div class="topic-metadata">

**Author:** [@RasmussenChristian](https://discuss.circleci.com/u/RasmussenChristian)\
**Replies:** 3\
**Last updated:** [December 21, 2021, 11:00pm UTC](https://discuss.circleci.com/t/circleci-caching-of-python-dependencies-not-working/34816 "2021-12-21T23:00:34Z")

</div>

Hey, I am trying to implement caching to speed up the time for testing of my app. I have gotten CircleCi to save and restore the cache successfully. However, it does still reinstall all of the dependencies each time, i…

---

## [Caching images from external registries](https://discuss.circleci.com/t/caching-images-from-external-registries/41617)

<div class="topic-metadata">

**Author:** [@vpereira](https://discuss.circleci.com/u/vpereira)\
**Replies:** 3\
**Last updated:** [November 24, 2021, 2:56am UTC](https://discuss.circleci.com/t/caching-images-from-external-registries/41617 "2021-11-24T02:56:39Z")

</div>

Hi, we use in our project, external images built on our own build server. In our config.yml we have them like open-build-service/config.yml at master · openSUSE/open-build-service · GitHub The issue is that would be nic…

---

## [CircleCI Job Modifying Fastfile to a Previous or Earlier Commit](https://discuss.circleci.com/t/circleci-job-modifying-fastfile-to-a-previous-or-earlier-commit/39363)

<div class="topic-metadata">

**Author:** [@mteece](https://discuss.circleci.com/u/mteece)\
**Replies:** 4\
**Last updated:** [June 3, 2021, 4:25pm UTC](https://discuss.circleci.com/t/circleci-job-modifying-fastfile-to-a-previous-or-earlier-commit/39363 "2021-06-03T16:25:36Z")

</div>

For the past few weeks our iOS builds have been failing via errors in Fastlane. When we go to troubleshoot everything works as expected locally, and then we push those changes upstream. CircleCI is then triggered to star…

---

## [Caching based on the checksum of a directory's contents](https://discuss.circleci.com/t/caching-based-on-the-checksum-of-a-directorys-contents/28748)

<div class="topic-metadata">

**Author:** [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Replies:** 2\
**Last updated:** [May 16, 2021, 2:43am UTC](https://discuss.circleci.com/t/caching-based-on-the-checksum-of-a-directorys-contents/28748 "2021-05-16T02:43:50Z")

</div>

Inspired by a couple questions here, I wrote up a way to cache key based on your directories contents using md5sum. Hope it helps. (I’m sure there is a way to do this cleaner too) - run: | echo $(find ./…

---

## [Grpc not caching](https://discuss.circleci.com/t/grpc-not-caching/38510)

<div class="topic-metadata">

**Author:** [@myufa](https://discuss.circleci.com/u/myufa)\
**Replies:** 0\
**Last updated:** [December 15, 2020, 2:52am UTC](https://discuss.circleci.com/t/grpc-not-caching/38510 "2020-12-15T02:52:22Z")

</div>

New to circleci so bare with me :sweat\_smile: Trying to just lint an express app that lives in the backend/core folder of our repo. I implemented the npm caching example to speed up builds but one of our dependencies is…

---

## [Yarn cached install slow](https://discuss.circleci.com/t/yarn-cached-install-slow/34823)

<div class="topic-metadata">

**Author:** [@keyboard-clacker](https://discuss.circleci.com/u/keyboard-clacker)\
**Replies:** 1\
**Last updated:** [March 13, 2020, 2:47am UTC](https://discuss.circleci.com/t/yarn-cached-install-slow/34823 "2020-03-13T02:47:17Z")

</div>

Hey there! I’m currently trying to use caching to reduce the amount of time installing dependencies takes in my builds, but I’m seeing that even with caching implemented as suggested, yarn install is still taking ~1 minu…

---

## [Cannot find Pipfile.lock file while restoring cache in python 3.7.1 image](https://discuss.circleci.com/t/cannot-find-pipfile-lock-file-while-restoring-cache-in-python-3-7-1-image/33084)

<div class="topic-metadata">

**Author:** [@dekespo](https://discuss.circleci.com/u/dekespo)\
**Replies:** 2\
**Last updated:** [December 8, 2019, 7:56pm UTC](https://discuss.circleci.com/t/cannot-find-pipfile-lock-file-while-restoring-cache-in-python-3-7-1-image/33084 "2019-12-08T19:56:39Z")

</div>

Hi, I am trying to cache Pipfile.lock so that it won’t install packages every time there is a new PR on GitHub. I have following yml fie with ~/repo working directory where I expect Pipfile.lock is generated when it is…

---

## [Caching on a machine executor](https://discuss.circleci.com/t/caching-on-a-machine-executor/31197)

<div class="topic-metadata">

**Author:** [@neomatrix369](https://discuss.circleci.com/u/neomatrix369)\
**Replies:** 15\
**Last updated:** [August 6, 2019, 5:37pm UTC](https://discuss.circleci.com/t/caching-on-a-machine-executor/31197 "2019-08-06T17:37:14Z")

</div>

Is caching on the machine executor done as below: - restore\_cache: keys: - make-382-{{ arch }}-{{ .Branch }}-{{ .Environment.CIRCLE\_SHA1 }} - make-382-{{ arch }}-{{ .Branch }} …

---

## [Caching pg\_dump files by migrations](https://discuss.circleci.com/t/caching-pg-dump-files-by-migrations/28248)

<div class="topic-metadata">

**Author:** [@kirk-clover](https://discuss.circleci.com/u/kirk-clover)\
**Replies:** 7\
**Last updated:** [July 20, 2019, 12:04am UTC](https://discuss.circleci.com/t/caching-pg-dump-files-by-migrations/28248 "2019-07-20T00:04:01Z")

</div>

I have three repos that I run migrations on before doing downstream integration tests. We use Postgres as our database. The migrated repos are django & flask. In one job, we run the migrations in each repo, call pg\_dump …

---

## [Docker layer caching doesn't work as expected with a config in version 2.1](https://discuss.circleci.com/t/docker-layer-caching-doesnt-work-as-expected-with-a-config-in-version-2-1/30506)

<div class="topic-metadata">

**Author:** [@indigo423](https://discuss.circleci.com/u/indigo423)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 8:38pm UTC](https://discuss.circleci.com/t/docker-layer-caching-doesnt-work-as-expected-with-a-config-in-version-2-1/30506 "2019-05-22T20:38:03Z")

</div>

I’m investigating Docker Layer Caching which is enabled for our CircleCI project. To get familiar with the feature I’ve created a very simple project in our repository which has 2 RUN statements. The first takes pretty l…

---

## [Partial Cache Restoration & Bundler](https://discuss.circleci.com/t/partial-cache-restoration-bundler/24783)

<div class="topic-metadata">

**Author:** [@JamesChevalier](https://discuss.circleci.com/u/JamesChevalier)\
**Replies:** 1\
**Last updated:** [November 19, 2018, 9:28pm UTC](https://discuss.circleci.com/t/partial-cache-restoration-bundler/24783 "2018-11-19T21:28:43Z")

</div>

I’m confused about the code block in the Bundler (Ruby) section here: https://circleci.com/docs/2.0/caching/#bundler-ruby The code block in question is: - run: bundle install & bundle clean - restore\_cache: keys: …

---

## [DIY Docker Layer Caching - Dealing With Ever-Changing Base Image IDs](https://discuss.circleci.com/t/diy-docker-layer-caching-dealing-with-ever-changing-base-image-ids/23012)

<div class="topic-metadata">

**Author:** [@anonoz](https://discuss.circleci.com/u/anonoz)\
**Replies:** 0\
**Last updated:** [June 18, 2018, 5:04am UTC](https://discuss.circleci.com/t/diy-docker-layer-caching-dealing-with-ever-changing-base-image-ids/23012 "2018-06-18T05:04:40Z")

</div>

After following Jon’s tips on DIY docker layer caching at Notes on caching Docker layers in CircleCI, I found out our cache is not used by Docker whenever the base image is updated on Docker Hub. So this is how I deal w…

---

## [Caching composer dependencies](https://discuss.circleci.com/t/caching-composer-dependencies/1215)

<div class="topic-metadata">

**Author:** [@frank](https://discuss.circleci.com/u/frank)\
**Replies:** 3\
**Last updated:** [April 1, 2018, 12:51pm UTC](https://discuss.circleci.com/t/caching-composer-dependencies/1215 "2018-04-01T12:51:19Z")

</div>

TL;DR Add this to your circle.yml: dependencies: cache\_directories: - ~/.composer/cache A naive way to cache composer dependencies would be to add the install directory to the cache\_directories section of you…

---

## [Maven dependency caching for dependencies fetched from test step for non-maven based project](https://discuss.circleci.com/t/maven-dependency-caching-for-dependencies-fetched-from-test-step-for-non-maven-based-project/742)

<div class="topic-metadata">

**Author:** [@daluu](https://discuss.circleci.com/u/daluu)\
**Replies:** 6\
**Last updated:** [March 27, 2018, 8:53am UTC](https://discuss.circleci.com/t/maven-dependency-caching-for-dependencies-fetched-from-test-step-for-non-maven-based-project/742 "2018-03-27T08:53:41Z")

</div>

Thought it may be useful to share this info to the community. Scenario: We have a Java-based packaged binary (JAR file) and this gets pulled via wget on every build as external tool/dependency in dependency step. Thi…

---

## [CircleCi build fails with NOT RUN (:org-over-credit-limit) error when using caching, undocumented restrictions?](https://discuss.circleci.com/t/circleci-build-fails-with-not-run-org-over-credit-limit-error-when-using-caching-undocumented-restrictions/20012)

<div class="topic-metadata">

**Author:** [@toomanyjoes](https://discuss.circleci.com/u/toomanyjoes)\
**Replies:** 4\
**Last updated:** [February 13, 2018, 4:37pm UTC](https://discuss.circleci.com/t/circleci-build-fails-with-not-run-org-over-credit-limit-error-when-using-caching-undocumented-restrictions/20012 "2018-02-13T16:37:09Z")

</div>

I changed up my circle.yml file to cache docker images and restore them on a build. The cache key makes use of the branch template so that it is restored only for the same branch. During the process of testing this I sta…

---

## [Wildcard/pattern cache\_directories](https://discuss.circleci.com/t/wildcard-pattern-cache-directories/5159)

<div class="topic-metadata">

**Author:** [@jonfinerty](https://discuss.circleci.com/u/jonfinerty)\
**Replies:** 3\
**Last updated:** [December 19, 2017, 9:25pm UTC](https://discuss.circleci.com/t/wildcard-pattern-cache-directories/5159 "2017-12-19T21:25:50Z")

</div>

Hi, I've got a project in CircleCI which contains a few node projects within it. At the moment our npm install step takes a long time (10mins) and I'd like to drastically reduce this with caching. However I'd rathe…

---

## [Dynamic or programmatic caching of directories?](https://discuss.circleci.com/t/dynamic-or-programmatic-caching-of-directories/1455)

<div class="topic-metadata">

**Author:** [@suan](https://discuss.circleci.com/u/suan)\
**Replies:** 2\
**Last updated:** [January 18, 2018, 10:30pm UTC](https://discuss.circleci.com/t/dynamic-or-programmatic-caching-of-directories/1455 "2018-01-18T22:30:08Z")

</div>

Our situation is that we have a main Rails app, but which has many child components, some of which are client-side apps, etc. We need to cache directories like node\_modules/ for some components, but we don't want to expl…

---

## [How to cache SBT incremental compilation](https://discuss.circleci.com/t/how-to-cache-sbt-incremental-compilation/18746)

<div class="topic-metadata">

**Author:** [@hannahlaura44](https://discuss.circleci.com/u/hannahlaura44)\
**Replies:** 1\
**Last updated:** [December 17, 2017, 10:23pm UTC](https://discuss.circleci.com/t/how-to-cache-sbt-incremental-compilation/18746 "2017-12-17T22:23:48Z")

</div>

I am working to reduce the compile time for my build. Locally, SBT caches incremental compilations so that only files that are changed are re-compiled between builds. On circle ci, however, every build compiles all my so…

---

## [Caching apt-get packages](https://discuss.circleci.com/t/caching-apt-get-packages/9076)

<div class="topic-metadata">

**Author:** [@zzak](https://discuss.circleci.com/u/zzak)\
**Replies:** 2\
**Last updated:** [December 7, 2017, 5:56am UTC](https://discuss.circleci.com/t/caching-apt-get-packages/9076 "2017-12-07T05:56:16Z")

</div>

Many of you have asked about caching apt-get installs. I'm here to tell you that there's a way! Basically it involves downloading the apt packages and caching that directory between builds. Additionally, I will sho…

---

## [Constantly having to 'Rebuild without Cache'](https://discuss.circleci.com/t/constantly-having-to-rebuild-without-cache/7493)

<div class="topic-metadata">

**Author:** [@marija17](https://discuss.circleci.com/u/marija17)\
**Replies:** 3\
**Last updated:** [October 30, 2017, 12:16pm UTC](https://discuss.circleci.com/t/constantly-having-to-rebuild-without-cache/7493 "2017-10-30T12:16:05Z")

</div>

I have a repo on Circle CI running on OS X and I’ve had to consistently use the Rebuild without cache option when pushing something new or it gets hung up indefinitely in the Restore cache step. Has anyone had an expe…

[Next page](https://discuss.circleci.com/tag/caching/65.md?match_all_tags=true&page=1&tags%5B%5D=caching)
