Default caches configuration

This commit is contained in:
Neil Alexander 2020-12-04 14:31:28 +00:00
parent 4631f53241
commit 464ecd1e64
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -62,6 +62,7 @@ func (c *Global) Defaults() {
c.Kafka.Defaults() c.Kafka.Defaults()
c.Metrics.Defaults() c.Metrics.Defaults()
c.Caches.Defaults()
} }
func (c *Global) Verify(configErrs *ConfigErrors, isMonolith bool) { func (c *Global) Verify(configErrs *ConfigErrors, isMonolith bool) {
@ -70,6 +71,7 @@ func (c *Global) Verify(configErrs *ConfigErrors, isMonolith bool) {
c.Kafka.Verify(configErrs, isMonolith) c.Kafka.Verify(configErrs, isMonolith)
c.Metrics.Verify(configErrs, isMonolith) c.Metrics.Verify(configErrs, isMonolith)
c.Caches.Verify(configErrs, isMonolith)
} }
type OldVerifyKeys struct { type OldVerifyKeys struct {
@ -153,4 +155,5 @@ func (c *Caches) Defaults() {
} }
func (c *Caches) Verify(configErrs *ConfigErrors, isMonolith bool) { func (c *Caches) Verify(configErrs *ConfigErrors, isMonolith bool) {
checkPositive(configErrs, "global.caches.federationsender_cache_size", int64(c.FederationSenderEventCacheSize))
} }