Upstream sync
This commit is contained in:
3
infra/cache/cache.go
vendored
3
infra/cache/cache.go
vendored
@@ -31,11 +31,10 @@ type RedisCache struct {
|
||||
func Instance(cfg *config.Config) contract.CacheManager {
|
||||
once.Do(func() {
|
||||
client := redis.NewFailoverClient(&redis.FailoverOptions{
|
||||
MasterName: cfg.Cache.Master,
|
||||
MasterName: "master01",
|
||||
SentinelAddrs: []string{fmt.Sprintf("%s:%v", cfg.Cache.Server, cfg.Cache.Port)},
|
||||
Password: cfg.Cache.Pass,
|
||||
DB: cfg.Cache.DB,
|
||||
MaxRetries: 10,
|
||||
})
|
||||
|
||||
instance = &RedisCache{cfg, client}
|
||||
|
||||
@@ -119,7 +119,6 @@ type CacheConfig struct {
|
||||
Pass string
|
||||
Prefix string
|
||||
DefaultExpiration time.Duration
|
||||
Master string
|
||||
}
|
||||
|
||||
// CacheConfig represents the configuration values about the documentation config.
|
||||
@@ -195,7 +194,6 @@ func Read() (*Config, error) {
|
||||
Pass: viper.GetString("cache.pass"),
|
||||
Prefix: viper.GetString("cache.prefix"),
|
||||
DefaultExpiration: viper.GetDuration("cache.default-expiration"),
|
||||
Master: viper.GetString("cache.master-name"),
|
||||
},
|
||||
Lyft: LyftConfig{
|
||||
Client: viper.GetString("lyft.key"),
|
||||
|
||||
Reference in New Issue
Block a user