Docker Layer Caching FAQ


Docker Layer Caching (DLC) can reduce Docker image build times on CircleCI by caching individual layers of any Docker images built as part of your jobs.

Here are some frequently asked questions concerning DLC that will hopefully help our users understand CircleCI's DLC feature.

Frequently Asked Questions:

Is DLC available between different workflows under the same project?

Yes, DLC is not locked to specific workflows, jobs or branches of a project. 

How can I delete my DLC cache instance?

Via the CLI: 

You can delete the DLC cache for your project using our CircleCI CLI with the following command:

circleci project dlc purge <vcs-type> <org-name> <project-name> [flags]

To use the above command, ensure that your CircleCI CLI version is v0.1.24705 or newer.

Via the UI:

Navigate to your project on

Click Project Settings.

Navigate to Docker Layer Caching.

Click Delete Cache Contents.


Will cache hits be guaranteed with DLC? 

With DLC enabled, there can be scenarios where cache hits are not seen at certain steps.

Docker will attempt to leverage cache at each step (defined by your Dockerfile's RUN, ADD, COPY commands, for example).
Once an earlier step misses the cache, the cache is invalidated and subsequent steps will see cache miss as well.

If you are experiencing issues with frequent cache-misses or need high-parallelism, consider trying caching using docker build, which you can optionally implement using the CircleCI Docker orb

Was this article helpful?
0 out of 8 found this helpful



Article is closed for comments.