[v9.2.x] Chore: Remote cache key prefix (#59838) (#59877)

Chore: Remote cache key prefix (#59838)

* attempt to implement a remote cache key prefix

* add a test for the prefix store

* oh, linter

(cherry picked from commit 3978502d83)
This commit is contained in:
Serge Zaitsev
2022-12-06 15:16:36 +01:00
committed by GitHub
parent efc69a08fa
commit b221e8cac9
5 changed files with 64 additions and 11 deletions
+3
View File
@@ -1072,10 +1072,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")
@@ -1111,6 +1113,7 @@ func valueAsString(section *ini.Section, keyName string, defaultValue string) st
type RemoteCacheOptions struct {
Name string
ConnStr string
Prefix string
}
func (cfg *Cfg) readLDAPConfig() {