Cache Pull
Cache Push uploads the cache archive file to a remote location, as we explained in detail in the Cache Push step. On the other hand, Cache Pull downloads and extracts that archive file in the build pipeline, restoring all files and folders to their original locations.
Cache Push and Cache Pull components should work in coordination on the same cache file. Therefore, to download the pushed cache, the Cache Pull must have the same cache label as the Cache Push.
Previously, the Cache Pull/Push steps used branch-based caching by default. This behavior has been deprecated, and branches now share the same cache by default.
If you prefer to continue using branch-based caching, you can manually add branch information to your cache label. For further information, please check out the following documentation:
If you need to use the cached folder in a separate project, you have the capability to modify the value of $AC_BUILD_PROFILE_ID. For further information, please check out the following documentation:
This variables can be adjusted within the cache label field, as indicated by the red highlight in the accompanying image. Simply replace them with the project ID that corresponds to your intended usage.

If you need to use branch-based caching, you can modify the cache label input value. For more information, please check the following documentation:
Prerequisites​
There are no prerequisites required before using the Cache Pull step.
This component does not require any prerequisite steps for operation. The only thing necessary for the component to work as expected is to utilize the cached files before the step in which they will be used. Additionally, an important prerequisite for this step to function properly is that the files to be used must have been cached in previous builds.
For example, in the screenshot, to use cached files for Cocoapods, the Cache Pull step should be used before the Cocoapods Install step.

If no cache exists for the cache label, for example on the first build or after a failed push, Cache Pull logs an error (HTTP 404). The build is marked Warning and continues. It does not fail.
Input Variables​
This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).
| Variable Name | Description | Status |
|---|---|---|
$AC_CACHE_LABEL | User defined cache label to identify one cache from others. Both Cache Push and Cache Pull steps should have the same value to match. | Required |
$AC_REPOSITORY_DIR | Specifies the cloned repository path. This path will be generated after running the Git Clone step. | Optional |
The build token ID, generated at the start of the build, expires after 3 hours. If the Cache Pull or Cache Push step starts beyond this time, caching will fail.
This may lead to a 404 Error in the Cache Pull step during the next build if the Cache Push step is not completed successfully.
Cache Formats​
Cache Pull 1.0.8 and later restore both cache formats that Cache Push writes: the zip format and the faster tar and zstd format. The format is detected automatically.
- To restore the
zstdformat, the runner must havezstd. Without it, the step logs a warning and skips the cache. The build continues. - Files on disk that are newer than their cached copy, for example files from Git Clone, are not overwritten.
- Restored files are owned by the runner user.
Update Cache Pull to 1.0.8 or later before you update Cache Push. When Cache Push finds an older Cache Pull in the workflow, it keeps the zip format, so the cache still works, but without the faster compression.
Backward Compatibility​
Cache Pull versions older than 1.0.8 cannot read the tar and zstd format. They fail to extract it with an unzip error, which is a cache miss. The build is marked Warning and continues. This can happen in these cases:
- A cache label is shared between workflows or build profiles. For example, you share a cache between build profiles with another profile ID in the cache label. One workflow uses Cache Pull
1.0.8or later with Cache Push1.0.8or later, so it writes thezstdformat. Another workflow reads the same cache label with a Cache Pull older than1.0.8and gets a cache miss. - The same workflow pins an older Cache Pull and uses a new cache label. On the first build, Cache Pull finds no cache, and Cache Push writes the
zstdformat. On the second build, the older Cache Pull cannot read it (cache miss), and Cache Push detects the older Cache Pull and writeszip. On the third build, the older Cache Pull restores the cache. So there is one cache miss.
On runners without zstd, for example some self-hosted runners, Cache Pull logs a warning and skips a zstd cache (cache miss). The build continues.
Update every Cache Pull step that uses the cache label to 1.0.8 or later before you update Cache Push. This includes the steps in other workflows and build profiles that share the cache label.
To access the source code of this component, please use the following link: