Caching with keys

In many cases the current caching system is not useful. Let’s imagine a build where I have node modules.
Imagine I have a master branch and whenever I have a PR to this master branch, a build is triggered.
Let’s assume that I create a release every two weeks and I create a release branch to create the release, because you would want to lock your release code down in case there are changes to master that you don’t want to go live. Otherwise it would be error-prone.

Assuming my default branch is master and the master branch would never ever get built directly unless I manually trigger it for some reason, which means there will never be a default branch cache.

So where does this leave me? I create a PR and on the initial build I will never have a cache and every time I do this, bitrise will take 5 minutes or so just to push my node_modules into the cache, just in case I happen to make another build for that very specific PR and even then it’s not that big a difference because every time the pull and the push are triggered, they together take around 3-4 minutes, while a yarn install takes 4-5. So in this case it makes absolutely no sense to use the caching system on bitrise.

Why is a key system better?
This has a great example on Circle CI, I hope you check it out. They key can be attached to the checksum. The checksum could be taken from yarn.lock file and if the lock file has had no changes the push step would be skipped. Already at least 2 minutes advantage.
Using a key, the pull step can also be customized and specific files could be pulled, so instead of retaining 23458723 caches for my node_modules, there would only be one source of truth. I assume this should also be to bitrise’s advantage.

I love bitrise, it has great support, great community and everything, but I genuinely believe the caching system needs an overhaul or a different option. I think many would be happy about it if it were something directly callable from a script step and not a specific step of its own. I have been trying to use the cache for a while now and there just doesn’t seem to be a way where I gain much from it at the moment.

Thank you for the detailed feature request! And thank you for your kind words! I will enter this into our feature request database for evaluation.

Please understand that we get quite a number of feature requests and are not able to implement them all. We do review and prioritize these and try to implement as many as we can.

Thanks again!

1 Like