This article is about Codeship Basic.

Dependency Caching

You will need about one minute to read this article.

Note that this article addresses caching on Codeship Basic. If you are looking for information on caching with Codeship Pro, click here

What Is The Dependency Cache?

On all Codeship Basic projects, we automatically cache the dependency directories for several popular tools and frameworks to speed up future builds.

This means that all packages saved in these directories at the end of a build will be automatically loaded on the build machine for future builds.

Using The Dependency Cache

Any packages, up to 500mb, in the following directories at the end of your build will be automatically cached:

  • $HOME/.ivy2
  • $HOME/.m2/repository
  • $HOME/cache/bundler
  • $HOME/cache/yarn
  • $HOME/cache
  • $HOME/cache/pip
  • $REPO_ROOT/node_modules

Also note that we automatically configure bundler to write into ~/cache/bundler as well as yarn to write into $HOME/cache/yarn and pip to write into $HOME/cache/pip.

Clearing The Cache

You can manually clear the cache either by removing the populated cache directory in your setup commands at the start of your build (for instance, by adding a startup command rm -rf node_modules), by using our custom cs clear-cache command in your startup commands or by clicking on Reset Dependency Cache on the right sidebar when viewing any build.

Note that when clearing your dependency cache, you should wait 30-60 seconds to let the system run before triggering your next build.

Reset Dependency Cache

Need more help?

You can post on Stack Overflow using the tag #codeship or contact our Helpdesk.
We also have a couple of code examples and sample projects available for you to get started with.

Article not helpful?

Do you think we need to improve this article? If so, please submit our feedback form to help us improve this article!