Add system setting table with cache and also add cache supports for user setting (#18058)

This commit is contained in:
Lunny Xiao 2022-10-17 07:29:26 +08:00 committed by GitHub
parent 5d3dbffa15
commit f860a6d2e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 1117 additions and 436 deletions

View file

@ -606,6 +606,13 @@ func deprecatedSetting(oldSection, oldKey, newSection, newKey string) {
}
}
// deprecatedSettingDB add a hint that the configuration has been moved to database but still kept in app.ini
func deprecatedSettingDB(oldSection, oldKey string) {
if Cfg.Section(oldSection).HasKey(oldKey) {
log.Error("Deprecated `[%s]` `%s` present which has been copied to database table sys_setting", oldSection, oldKey)
}
}
// loadFromConf initializes configuration context.
// NOTE: do not print any log except error.
func loadFromConf(allowEmpty bool, extraConfig string) {