mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-11 08:03:09 -06:00
- to use new symbols from https://github.com/matrix-org/gomatrixserverlib/pull/403 that don't mention MSC2946
18 lines
617 B
Go
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.RoomHierarchyResponse, ok bool)
|
|
StoreRoomHierarchy(roomID string, r fclient.RoomHierarchyResponse)
|
|
}
|
|
|
|
func (c Caches) GetRoomHierarchy(roomID string) (r fclient.RoomHierarchyResponse, ok bool) {
|
|
return c.RoomHierarchies.Get(roomID)
|
|
}
|
|
|
|
func (c Caches) StoreRoomHierarchy(roomID string, r fclient.RoomHierarchyResponse) {
|
|
c.RoomHierarchies.Set(roomID, r)
|
|
}
|