Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestion: Bitbucket Cache re-upload

fo'connor October 22, 2024

Trying to configure various changeset conditions, cache-keys or clear-cache steps does not help the fact that you need to re-download the dependencies all the time after a cache is cleared/not found. 

My suggestion is to add a configuration option that will allow to cache to be re-uploaded with the new contents.

definitions:
caches:
maven-cache:
replace: true
path: ~/.m2/repository

Then a project could add a new dependency and have it added to the cache without having to clear the old one.

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 23, 2024

Hi @fo'connor 

Welcome to the Bitbucket Cloud community! :) 

Before raising a feature request on your behalf - I'll need a bit more context.

The purpose of the cache is to prevent needing to download dependencies if new pipelines are run within a 7 day period.

If an option is configured to replace the existing cache each time, would this not negate the purpose of a cache?

Cheers!

- Ben (Bitbucket Cloud Support)

fo'connor October 23, 2024

Hi @Ben

 

My use case would be if a number of new dependencies were added to a project after the cache is created. These dependencies would be downloaded for every subsequent pipeline.

Currently the only way to add these into the cache is to delete the cache and rebuild it again, which means downloading all the dependencies in the original cache again too.

 

Hope that makes sense!

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2024

Hi @fo'connor 

Thank you for clarifying. Based on your use case - our smarter caches feature may handle this with cache keys. Can you please read the documentation below and let me know if it helps?

Cheers!

- Ben (Bitbucket Cloud Support)

 

fo'connor October 25, 2024

No, this doesn't work either since adding a new dependency would be a cache miss and redownload everything again.

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 27, 2024

My apologies @fo'connor 

I've re-read your request and noticed you already mentioned cache keys.

I've raised a feature request on your behalf to our development team. Please feel free to Watch this for future updates and Vote for it to improve its visibility with regard to customer demand:

Cheers!

- Ben (Bitbucket Cloud Support)

Like fo'connor likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events