permanent cache between different branches

Aliaksandr Pasynkau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2018

(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

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2018

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events