The step can now skip saving the cache if it detects that the new cache would have the same contents as previously restored in the workflow with the restore-cache
step. This requires two things:
- use a cache key that includes a checksum (thus the key changes every time the cached files change)
- opt-in to this optimization by setting the
is_key_unique
input totrue
Even if is_key_unique
is false (the default value), the step can skip the uploading phase, but it needs to create the compressed archive still. Make sure to use checksums in the cache key and set is_key_unique
for the best results.
Note: this feature requires support from the restore-cache
step too, make sure to upgrade to version 1.0.2.
What鈥檚 Changed
- Skip saving the cache if possible by @ofalvai in Skip saving the cache if possible by ofalvai 路 Pull Request #22 路 bitrise-steplib/bitrise-step-save-cache 路 GitHub
- Track cache skip reasons by @ofalvai in Track cache skip reasons by ofalvai 路 Pull Request #23 路 bitrise-steplib/bitrise-step-save-cache 路 GitHub
Full Changelog: Comparing 1.0.2...1.1.0 路 bitrise-steplib/bitrise-step-save-cache 路 GitHub