diff options
Diffstat (limited to 'setup/base')
-rw-r--r-- | setup/base/base.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/setup/base/base.go b/setup/base/base.go index 5cbd7da9..93ab87de 100644 --- a/setup/base/base.go +++ b/setup/base/base.go @@ -161,11 +161,6 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base } } - cache, err := caching.NewInMemoryLRUCache(enableMetrics) - if err != nil { - logrus.WithError(err).Warnf("Failed to create cache") - } - var dnsCache *gomatrixserverlib.DNSCache if cfg.Global.DNSCache.Enabled { dnsCache = gomatrixserverlib.NewDNSCache( @@ -233,7 +228,7 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base UseHTTPAPIs: useHTTPAPIs, tracerCloser: closer, Cfg: cfg, - Caches: cache, + Caches: caching.NewRistrettoCache(cfg.Global.Cache.EstimatedMaxSize, cfg.Global.Cache.MaxAge, enableMetrics), DNSCache: dnsCache, PublicClientAPIMux: mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicClientPathPrefix).Subrouter().UseEncodedPath(), PublicFederationAPIMux: mux.NewRouter().SkipClean(true).PathPrefix(httputil.PublicFederationPathPrefix).Subrouter().UseEncodedPath(), |