chore: make reg cache expiry tunable

Mostly for the tests, opts:

- tuning.register_cache_expiration
- tuning.register_cache_cleanup
This commit is contained in:
Andrey Bobelev
2025-08-29 14:20:07 +02:00
committed by nblock
parent bd35fcf338
commit 022098fe4e
2 changed files with 16 additions and 2 deletions

View File

@@ -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
}