Make federation caches mutable

This commit is contained in:
Neil Alexander 2022-06-14 14:41:15 +01:00
parent da107c78da
commit 345a01ce73
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -50,12 +50,14 @@ func NewRistrettoCache(maxCost CacheSize, enablePrometheus bool) (*Caches, error
MaxAge: time.Minute * 5, MaxAge: time.Minute * 5,
}, },
FederationPDUs: &RistrettoCachePartition[int64, *gomatrixserverlib.HeaderedEvent]{ FederationPDUs: &RistrettoCachePartition[int64, *gomatrixserverlib.HeaderedEvent]{
cache: cache, cache: cache,
Name: "federation_events_pdu", Name: "federation_events_pdu",
Mutable: true,
}, },
FederationEDUs: &RistrettoCachePartition[int64, *gomatrixserverlib.EDU]{ FederationEDUs: &RistrettoCachePartition[int64, *gomatrixserverlib.EDU]{
cache: cache, cache: cache,
Name: "federation_events_edu", Name: "federation_events_edu",
Mutable: true,
}, },
SpaceSummaryRooms: &RistrettoCachePartition[string, gomatrixserverlib.MSC2946SpacesResponse]{ SpaceSummaryRooms: &RistrettoCachePartition[string, gomatrixserverlib.MSC2946SpacesResponse]{
cache: cache, cache: cache,