Pointerise types.RoomInfo in the cache so we can update it in-place in the latest events updater

This commit is contained in:
Neil Alexander 2022-07-13 10:13:34 +01:00
parent 9cd8e9d4b9
commit a1f9b02edf
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 15 additions and 16 deletions

View file

@ -100,7 +100,7 @@ func NewRistrettoCache(maxCost config.DataUnit, maxAge time.Duration, enableProm
MaxAge: maxAge,
},
},
RoomInfos: &RistrettoCachePartition[string, types.RoomInfo]{ // room ID -> room info
RoomInfos: &RistrettoCachePartition[string, *types.RoomInfo]{ // room ID -> room info
cache: cache,
Prefix: roomInfosCache,
Mutable: true,