(we use nodejs environment)
Imagine:
Somebody develop the project in main branch. He updated several dependencies. After successful building on CI pipelines-cache will get new package. everything is ok
Checkout to other branch without this changes of packages. Cache downloaded completely. BUT you need to reinstall dependencies in CI. and after that cache will be saved.
Checkout to main branch and cache you need to reinstall one more time.
If team have 10+ developers the problem is formulated as "cache doesn't work"
Expect behavior - cache is really specific for every git branch
Hi Aliasksandr,
Caches do not reupload if it was already downloaded for a step. Caches are only uploaded if no cache was available for that step. So your assumed situation shouldn't be happening as frequently as you suggest. Are you seeing differently?
Your cache should still have shared dependencies between them. Some dependencies may need downloading due to version differences between branches. But you should still have most of your dependencies available in the cache (which hopefully still provides some benefit to you).
If you're particularly interested in having per branch caching, you can open a feature request here: https://bitbucket.org/site/master/issues/new
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.