redesign caching of application settings
What does this MR do?
Decreases number of round-trips to Redis and PostgreSQL by caching Application Settings. It also avoids calling ActiveRecord before (1) the DB is available, (2) the ApplicationSetting table is available, or (3) while migrations are pending
Why was this MR needed?
Design of caching for Application Settings was not being adhered to and approximately 10% of the DB transaction volume was checking the migration status of the DB and/or the availability of the ApplicationSetting table.
Does this MR meet the acceptance criteria?
- [ ] Changelog entry added, if necessary
- [ ] Documentation created/updated
- [ ] API support added
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
#33279 (closed), #33278 (closed), https://gitlab.com/gitlab-com/infrastructure/issues/1930