mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-22 14:21:55 -06:00
RoomServerEvents are mutable, given they can be redacted
This commit is contained in:
parent
a684b850b9
commit
11a3fcc6cb
|
@ -22,11 +22,12 @@ import (
|
||||||
|
|
||||||
"github.com/dgraph-io/ristretto"
|
"github.com/dgraph-io/ristretto"
|
||||||
"github.com/dgraph-io/ristretto/z"
|
"github.com/dgraph-io/ristretto/z"
|
||||||
"github.com/matrix-org/dendrite/roomserver/types"
|
|
||||||
"github.com/matrix-org/dendrite/setup/config"
|
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
|
|
||||||
|
"github.com/matrix-org/dendrite/roomserver/types"
|
||||||
|
"github.com/matrix-org/dendrite/setup/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -98,9 +99,10 @@ func NewRistrettoCache(maxCost config.DataUnit, maxAge time.Duration, enableProm
|
||||||
},
|
},
|
||||||
RoomServerEvents: &RistrettoCostedCachePartition[int64, *gomatrixserverlib.Event]{ // event NID -> event
|
RoomServerEvents: &RistrettoCostedCachePartition[int64, *gomatrixserverlib.Event]{ // event NID -> event
|
||||||
&RistrettoCachePartition[int64, *gomatrixserverlib.Event]{
|
&RistrettoCachePartition[int64, *gomatrixserverlib.Event]{
|
||||||
cache: cache,
|
cache: cache,
|
||||||
Prefix: roomEventsCache,
|
Prefix: roomEventsCache,
|
||||||
MaxAge: maxAge,
|
MaxAge: maxAge,
|
||||||
|
Mutable: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
RoomServerStateKeys: &RistrettoCachePartition[types.EventStateKeyNID, string]{ // event NID -> event state key
|
RoomServerStateKeys: &RistrettoCachePartition[types.EventStateKeyNID, string]{ // event NID -> event state key
|
||||||
|
|
Loading…
Reference in a new issue