Speed up builds by caching your dependencies. With dependency caching you can store and reuse dependencies that are frequently used in your builds, such as SDKs, libraries, and other third-party dependencies.
Optimize your caching strategy based on specific requirements, such as using different caches for different dependencies, workflows, or stacks. By associating cache archives with unique cache keys, workflows can restore a specific cache archive by calling out the corresponding cache key, e.g. “give me the latest cache of node_modules”.
Mobile developers love our ready-to-use, out-of-the-box cache Steps for popular dependency managers, containing the code needed to cache your third party dependencies. No setup needed for iOS, Android, or React Native, with key-based caching support for cocoapods, SPM, Gradle and NPM.
With multiple caches per app, you can have different caches per stack, and separate caches for Linux and Mac simultaneously. Additionally, you can also have different caches per workflow, which prevents the cache from being overwritten if building on a different workflow or stack.
With fewer caching restrictions, mobile developers can create more effective and customized caching strategies, resulting in faster builds, reduced resource usage, and a more streamlined development process. Mobile teams have reported a 27% to 51% reduction time between the time taken to restore and download dependencies.
Dependency caching allows you to store and reuse dependencies that are frequently used in your builds.
Typically, when a build is executed, build dependencies are downloaded from external sources such as package managers or third-party APIs—which can take up valuable time and resources especially if the same dependencies are used in multiple builds.To avoid this, Bitrise allows you to cache dependencies for reuse in subsequent builds.
Our dependency caching works by storing the downloaded dependencies in a cache, which can be accessed by subsequent builds. When a new build is triggered, the cached dependencies are checked first, and if they are found, they are reused instead of being downloaded again. This can save significant time and resources, especially for large dependencies or for those with slow download speeds.
Access cache archives via key strings, by using Restore Cache and Save cache Steps. Cache keys need to be specified as the values of the cache keys Step input—each key identifies a separate cache archive.
By automatically removing outdated cache files, cache sizes can be reduced by up to 71%.
Automatically invalidate stale files in a cacheNo need to invalidate stale cache files—we do it for you.
Have separate caches per branch, per workflow, and per stack.
Optimize your build and testing process with caches shared across workflows, branches, and stacks using the same set of dependencies.Build consistency and reliability—reduce the risk of errors and inconsistencies.
In addition to dependency caching, Bitrise provides build and test caching. This feature, which is exclusively available on Bitrise, is fully managed by us, requiring no configuration or upkeep from you. Our pre-built cache Steps can be used to cache build and test tasks or artifacts with maximum efficiency, and our high-performance Content Delivery Network (CDN) ensures that the cache is stored in close proximity to the machines that execute the builds, resulting in further speed improvements. Talk to us for more on build and test caching.