From 464ecd1e64b9d2983f6fd5430e9607519d543cb3 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 4 Dec 2020 14:31:28 +0000 Subject: [PATCH] Default caches configuration --- setup/config/config_global.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/config/config_global.go b/setup/config/config_global.go index ef2b09113..3b8fee529 100644 --- a/setup/config/config_global.go +++ b/setup/config/config_global.go @@ -62,6 +62,7 @@ func (c *Global) Defaults() { c.Kafka.Defaults() c.Metrics.Defaults() + c.Caches.Defaults() } 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.Metrics.Verify(configErrs, isMonolith) + c.Caches.Verify(configErrs, isMonolith) } type OldVerifyKeys struct { @@ -153,4 +155,5 @@ func (c *Caches) Defaults() { } func (c *Caches) Verify(configErrs *ConfigErrors, isMonolith bool) { + checkPositive(configErrs, "global.caches.federationsender_cache_size", int64(c.FederationSenderEventCacheSize)) }