Memoize Gitlab::Database.version

What does this MR do?

This memoizes the result of Gitlab::Database.version, removing the need for querying the database every time we want to check the version.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/46431

Merge request reports

Loading