Yarn cache and cache-push/pull

react-native
build-cache
#1

Hello,

I am trying to improve the caching on our builds for a react-native app.
I know that there is the cache steps (cache-push / cache-pull), but there is also a caching option added to the yarn step: https://github.com/bitrise-steplib/steps-yarn/blob/master/step.yml#L40

I am wondering how those two things coexist and if there is a specific setup to use?
If I use the caching on the yarn step, what happens to the caching on cache-push, etc.

It kind of relates to this question: How can I use cache push/pull for react native apps?

Thank you!

0 Likes

#2

Hi @fabien_hinge!

Yarn caching happens automatically through the push and pull steps by default.The input you are referring to here, can be used to cache the contents of the node_modules directories located under the project root, in addition.

Hope this helps!

0 Likes

#3

Thank you.

Just to clarify:

Yarn caching happens automatically through the push and pull steps by default.

Do you mean that push/pull caches the node_modules as well?
Or what’s getting cached otherwise? I am struggling to understand the diff

Cheers

0 Likes