Where do I find the server side cache files?

Must-share information (formatted with Markdown):

  • which versions are you using SonarQube 9.9.3 LTS
  • how is SonarQube deployed: Don’t know.
  • I want to enable server side cache but the maintainers of the server are afraid there is not enough disk space. I have enabled server side caching for one branch and I am curious how much disk space this cache uses - where can I find the file so I can make an estimate of the total required disk space for this functionality.

Hey there.

They are stored in the database – so disk space on your SonarQube server won’t be an issue.

The database is a black box we don’t expect users to dive into. For what it’s worth, they are stored in the scanner_analysis_cache table.

Hi Colin.
Thanks for the answer. Is there any approximate correlation between the size displayed during analysis and what is taken up in the DB?

Hey there.

I’m not confident in telling you exactly how large to expect the cache files to be. The larger the project, the larger the cache, but it’s not an exact copy of the analysis report.

However, I wouldn’t be too worried, since cache files are:

  • Only stored once per branch
  • Purged after 7 days of not being updated

So you may see an increase in database size once you turn it on, but it should stabilize.