Sonar cache hit ratio is very low always

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
    We are running sonar-scanner with sonar-cache enabled, with our implementation, we create sonar-branch(short-lived branch) for every analysis, and master compilation runs on nightly mode. The short-lived branches and master analysis is done at two different locations for same code.
    With short-lived branch the cache is enabled, but the cache hit ratio is always low, can you help point us why ?
  • what have you tried so far to achieve this
    we see cache is enabled , but the hit ratio is very less. how to improve the cache hits?

INFO: Subprocess(es) done in 3740388ms
INFO: Cache: 44/6980 hits, 1543436875 bytes


Welcome to the community!

I’ve flagged this for more expert attention than I can give the topic, but in the meantime, can you provide your SonarQube version and which scanner (the Scanner CLI?) you’re using?