Automatic compilation caching
Revyl enables the right compilation caches for each platform without changing your build commands:
The first compatible build warms the cache. Later builds on the same toolchain
can reuse its compiler outputs across apps and branches in your organization.
The snippets below focus on cache fields. Keep the selected recipe’s runnable
app_id, build_commands, and output_path from your build configuration.
You can turn each cache off independently:
"0" (off) or "1" (on) and defaults to "1".
Compilation caching is an optimization, not a build dependency. If it is
unavailable, the build continues normally. It is also skipped when the build
timeout is longer than 60 minutes.
Configured path caches
Declare defaults underbuild.caches and recipe-specific additions under
build.profiles.<name>.<platform>.caches. Each cache has a key and a list of
project-relative paths stored under it:
.. segments are rejected.
How configured caches work
Build-level and recipe caches merge by key. For a matching key, build-level paths come first and recipe paths are appended with duplicates removed. Each effective key maps to one compressed archive that Revyl stores between builds:- After checkout, Revyl restores the latest archive directly into the clean build workspace. A new key starts empty.
- Your commands read and write the configured paths normally, such as
node_modules,Pods, or DerivedData. - If the build succeeds, Revyl archives those exact paths and saves them for the next build. Failed builds don’t update caches, so a broken run can’t poison them.
What to cache
Tool caches that normally live in your home directory must be redirected into
the project. For example:
output_path specific enough that
it cannot select a stale artifact.
Cold builds and clearing caches
revyl cache list and delete manage configured caches only. Compilation
caches are managed automatically and can be bypassed with --no-cache or the
individual environment settings above.
Troubleshooting
- The second build is still slow: make sure the first build completed successfully and compare builds using the same toolchain.
- Dependency installation is still slow: add its download or install directory to a configured cache.
- A configured cache looks stale: try
--no-cache, then delete the cache if the cold build fixes the problem. - Compilation caching is missing: check the build logs for
compilation-cachemessages and confirm the timeout is 60 minutes or less.
Related
- Fingerprinting: skip unnecessary native rebuilds for Expo and React Native apps
- Configuration: the full
build:reference - Toolchain Images: what’s already installed