Hello everyone,
I'm experiencing an issue with Bitbucket Pipelines where it isn't creating a new version of the cache for different branches, even though the package-lock.json file is different in each branch. Instead, it seems to be using the same cache across all branches.
Here's the cache configuration I'm using:
caches:
node-server:
key:
files:
- server/package-lock.json
path: server/node_modules
node-ui:
key:
files:
- package-lock.json
path: node_modules
In each branch, the package-lock.json files differ, so I expect Bitbucket to create a new cache for each branch. However, it keeps reusing the same cache, which causes build issues.
The cache keys are based on the package-lock.json contents, but Bitbucket isn't generating a new cache for each branch as expected.
Has anyone faced this issue? Any suggestions on how to ensure a new cache version is created for each branch when package-lock.json changes?
Thanks in advance!