chore: make reg cache expiry tunable
Mostly for the tests, opts: - tuning.register_cache_expiration - tuning.register_cache_cleanup
This commit is contained in:
parent
bd35fcf338
commit
022098fe4e
2 changed files with 16 additions and 2 deletions
|
|
@ -235,6 +235,8 @@ type Tuning struct {
|
|||
BatchChangeDelay time.Duration
|
||||
NodeMapSessionBufferedChanSize int
|
||||
BatcherWorkers int
|
||||
RegisterCacheCleanup time.Duration
|
||||
RegisterCacheExpiration time.Duration
|
||||
}
|
||||
|
||||
func validatePKCEMethod(method string) error {
|
||||
|
|
@ -1002,6 +1004,8 @@ func LoadServerConfig() (*Config, error) {
|
|||
}
|
||||
return DefaultBatcherWorkers()
|
||||
}(),
|
||||
RegisterCacheCleanup: viper.GetDuration("tuning.register_cache_cleanup"),
|
||||
RegisterCacheExpiration: viper.GetDuration("tuning.register_cache_expiration"),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue