Hey @joshuaongps
thanks for the feedback.
The team just delivered something that may help with your use case.
Key-value caching beta
We’ve released new cache Steps that support more complex caching logics.
With them, you can specify keys for each cache, and the cache will not have a branch, workflow, or stack restrictions.
The Steps
Bit more about it key-value caching
# Advanced key-based cache recipes (Beta)
These workflow recipes are based on the **Save cache** and **Restore cache** Steps (currently in Beta).
For recipes about the most popular platforms and dependency managers, check out the **Key-based caching** section in the [README](../README.md).
## Key templates
The **Save cache** and **Restore cache** Steps use a string key when uploading and downloading a cache archive. To always download the most relevant cache archive for each build, the **Cache key** input can contain template elements. The Steps evaluate the key template at runtime and the final key value can change based on the build environment or files in the repo.
The following variables are supported in the **Cache key** input:
- `cache-key-{{ .Branch }}`: Current git branch the build runs on
- `cache-key-{{ .CommitHash }}`: SHA-256 hash of the git commit the build runs on
- `cache-key-{{ .Workflow }}`: Current Bitrise workflow name (eg. `primary`)
- `{{ .Arch }}-cache-key`: Current CPU architecture (`amd64` or `arm64`)
- `{{ .OS }}-cache-key`: Current operating system (`linux` or `darwin`)
Functions available in a template:
This file has been truncated. show original
Here you can find some workflow recipes