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 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.
- 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