hi @Abbas ,
We are facing similar issues with cache mechanism when used in PR pipelines,
When ran same PR two consecutive times,
First build → takes 40 mins to scan (no cache hits)
Second build → takes 3-5 mins to scan (hits cache for almost all the files)
But if there was any other PR build ran in between these then again no cache hits and full cache is regenerated, takes 40 mins time.
Since you have mentioned about the paths above ? Do they need to match for each PR build ? if not, cache is invalid ?
As of now all our PR build workspaces are created uniquely based on PR number.
We are working with Sonarqube 9.4.0 (I know that there is analysis change in 9.7 but I am not sure if this behavior will change even when upgraded)