Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket pipelines cache keys?

Zorpen December 20, 2018

Hi there.

Does pipelines caching system support cache keys?

In my project build process i have many assets to be built by webpack. Resulting assets are copied to public/build directory. That process can take several minutes to complete.

So i would like to generate hash of the assets directory (the one from which webpack is building) and store a cache with a key for example "assets-{assets-directory-hash}" with the public/build directory as a content.

Then in a next build if assets directory hash didn't change it would mean that assets didn't change, and i could skip webpack building step, restore public/build directory from the cache, and save few minutes of the entire build as a result. If hash did change, then i would run webpack as usual, and store cache with a new key.

Thanks.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events