Docker Image Cache¶
The Docker Image Cache (DIC) is a great way to speed up the build process of deployments. This feature is enabled by default for new repositories.
Squash generates a cache snapshot for each unique Dockerfile/docker-compose file across all branches in a repository. This is done by keeping a md5sum reference of each Dockerfile/docker-compose file. When a Dockerfile or docker-compose file changes Squash will build it from scratch and save a new cache snapshot.
Invalidating the cache¶
Besides the md5sum, Squash also keeps a reference of the branch where the Dockerfile/docker-compose file was generated for the first time (origin branch). Squash automatically updates the cache and deletes the previous version when the Dockerfile changes in the origin branch.
Another easy way to update the cache is to change the Dockerfile/docker-compose file on any branch within the repository. Squash in this case will create a new cache snapshot and use the branch as its origin branch.
How to enable or turn off the cache¶
Click on the checkbox “Cache Docker Images”.
This setting is enabled by default for new repositories.
Cache retrieval notification¶
Squash provides information on several areas on when a DIC snapshot is being used or not.
Deployment Loading page¶
When you start a new deployment Squash will display on the sidebar whether or not a DIC snapshot is available and being used:
Deployment Details page¶
Same for the deployment details page:
Historical Deployments page¶
The historical page also display this information: