Chore: Remote cache key prefix (#59838)

* attempt to implement a remote cache key prefix

* add a test for the prefix store

* oh, linter
This commit is contained in:
Serge Zaitsev
2022-12-06 13:20:49 +01:00
committed by GitHub
parent 932349b5ab
commit 3978502d83
5 changed files with 64 additions and 11 deletions
+3
View File
@@ -1120,10 +1120,12 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
cacheServer := iniFile.Section("remote_cache")
dbName := valueAsString(cacheServer, "type", "database")
connStr := valueAsString(cacheServer, "connstr", "")
prefix := valueAsString(cacheServer, "prefix", "")
cfg.RemoteCacheOptions = &RemoteCacheOptions{
Name: dbName,
ConnStr: connStr,
Prefix: prefix,
}
geomapSection := iniFile.Section("geomap")
@@ -1159,6 +1161,7 @@ func valueAsString(section *ini.Section, keyName string, defaultValue string) st
type RemoteCacheOptions struct {
Name string
ConnStr string
Prefix string
}
func (cfg *Cfg) readLDAPConfig() {