From 345a01ce73791f54873f7da9eaa3fb46adf0398f Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 14 Jun 2022 14:41:15 +0100 Subject: [PATCH] Make federation caches mutable --- internal/caching/impl_ristretto.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/caching/impl_ristretto.go b/internal/caching/impl_ristretto.go index eb209f038..d7e31596b 100644 --- a/internal/caching/impl_ristretto.go +++ b/internal/caching/impl_ristretto.go @@ -50,12 +50,14 @@ func NewRistrettoCache(maxCost CacheSize, enablePrometheus bool) (*Caches, error MaxAge: time.Minute * 5, }, FederationPDUs: &RistrettoCachePartition[int64, *gomatrixserverlib.HeaderedEvent]{ - cache: cache, - Name: "federation_events_pdu", + cache: cache, + Name: "federation_events_pdu", + Mutable: true, }, FederationEDUs: &RistrettoCachePartition[int64, *gomatrixserverlib.EDU]{ - cache: cache, - Name: "federation_events_edu", + cache: cache, + Name: "federation_events_edu", + Mutable: true, }, SpaceSummaryRooms: &RistrettoCachePartition[string, gomatrixserverlib.MSC2946SpacesResponse]{ cache: cache,