diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-07-13 10:13:34 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-07-13 10:13:34 +0100 |
commit | a1f9b02edfd56809eaedd04fd233b1828085e190 (patch) | |
tree | dc48e75fcc7244230c5004c1df69d5be0a571329 /internal/caching/cache_roominfo.go | |
parent | 9cd8e9d4b97c6cff66665f57065a5bb8b7144045 (diff) |
Pointerise `types.RoomInfo` in the cache so we can update it in-place in the latest events updater
Diffstat (limited to 'internal/caching/cache_roominfo.go')
-rw-r--r-- | internal/caching/cache_roominfo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/caching/cache_roominfo.go b/internal/caching/cache_roominfo.go index d03a6107..5dfed3c8 100644 --- a/internal/caching/cache_roominfo.go +++ b/internal/caching/cache_roominfo.go @@ -16,18 +16,18 @@ import ( // a room Info cache. It must only be used from the roomserver only // It is not safe for use from other components. type RoomInfoCache interface { - GetRoomInfo(roomID string) (roomInfo types.RoomInfo, ok bool) - StoreRoomInfo(roomID string, roomInfo types.RoomInfo) + GetRoomInfo(roomID string) (roomInfo *types.RoomInfo, ok bool) + StoreRoomInfo(roomID string, roomInfo *types.RoomInfo) } // GetRoomInfo must only be called from the roomserver only. It is not // safe for use from other components. -func (c Caches) GetRoomInfo(roomID string) (types.RoomInfo, bool) { +func (c Caches) GetRoomInfo(roomID string) (*types.RoomInfo, bool) { return c.RoomInfos.Get(roomID) } // StoreRoomInfo must only be called from the roomserver only. It is not // safe for use from other components. -func (c Caches) StoreRoomInfo(roomID string, roomInfo types.RoomInfo) { +func (c Caches) StoreRoomInfo(roomID string, roomInfo *types.RoomInfo) { c.RoomInfos.Set(roomID, roomInfo) } |