mirror of
https://github.com/grafana/grafana.git
synced 2024-12-25 08:21:46 -06:00
ddf766567b
* refactor remote cache settings * fix cache error getting treating as application error * fix cache error getting treating as application error
24 lines
592 B
Go
24 lines
592 B
Go
package setting
|
|
|
|
type RemoteCacheSettings struct {
|
|
Name string
|
|
ConnStr string
|
|
Prefix string
|
|
Encryption bool
|
|
}
|
|
|
|
func (cfg *Cfg) readRemoteCacheSettings() {
|
|
cacheServer := cfg.Raw.Section("remote_cache")
|
|
dbName := valueAsString(cacheServer, "type", "database")
|
|
connStr := valueAsString(cacheServer, "connstr", "")
|
|
prefix := valueAsString(cacheServer, "prefix", "")
|
|
encryption := cacheServer.Key("encryption").MustBool(false)
|
|
|
|
cfg.RemoteCacheOptions = &RemoteCacheSettings{
|
|
Name: dbName,
|
|
ConnStr: connStr,
|
|
Prefix: prefix,
|
|
Encryption: encryption,
|
|
}
|
|
}
|