Fix in-memory representation of ApplicationSetting
Problem
After updating the settings in a SSoT service, the cache should be invalidated consistently. We use in-memory application settings especially in specs and this doesn't behave consistently because the cache is ignored and the modified version of the settings is not retained in memory.
When using in-memory settings, any updates persisted in the database should be reflected in the in-memory representation. The in-memory should be a default source when the ApplicationSetting record doesn't exist in the database, to ensure we always have some settings.
Edited by Fabio Pitino - PTO until Jan 1