dendrite/internal/caching/cache_space_rooms.go
Sam Wedgwood c97ba0b9e6 First pass as de-MSC-ifying space summaries
- Opt for referring to it as 'room hierarchies', reflecting the route
- Split msc2945.go across clientapi and roomserverapi
- Still TODO fed api
- Some other TODOs still to do
2023-07-13 15:49:44 +01:00

18 lines
617 B
Go

package caching
import "github.com/matrix-org/gomatrixserverlib/fclient"
// RoomHierarchy cache caches responses to federated room hierarchy requests (A.K.A. 'space summaries')
type RoomHierarchyCache interface {
GetRoomHierarchy(roomID string) (r fclient.MSC2946SpacesResponse, ok bool)
StoreRoomHierarchy(roomID string, r fclient.MSC2946SpacesResponse)
}
func (c Caches) GetRoomHierarchy(roomID string) (r fclient.MSC2946SpacesResponse, ok bool) {
return c.RoomHierarchies.Get(roomID)
}
func (c Caches) StoreRoomHierarchy(roomID string, r fclient.MSC2946SpacesResponse) {
c.RoomHierarchies.Set(roomID, r)
}