Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically invalidate Bitbucket Pipeline's cache?

I have a node_modules cache in my Bibucket Pipeline and I added new module (eg yarn add react-modal) - how to make Bitbucket pipelines detect new yarn.lock and invalidate its cache?

like image 335
Marecky Avatar asked Feb 28 '18 09:02

Marecky


2 Answers

Here is the official way to clear the caches

https://bitbucket.org/atlassian/bitbucket-clear-cache/src/master/

like image 148
Marecky Avatar answered Oct 14 '22 10:10

Marecky


Yeah, as Marecky have already mentioned, there is a ticket for that. Also, there is another one here https://jira.atlassian.com/browse/BCLOUD-17605, which should exactly address the issue. In short, there is an API to invalidate the cache, but it's currently reserved for internal use only.

like image 39
Alexander Zhukov Avatar answered Oct 14 '22 09:10

Alexander Zhukov