2022-03-01 16:32:48 +00:00
|
|
|
package caching
|
|
|
|
|
2023-04-06 08:55:01 +00:00
|
|
|
import "github.com/matrix-org/gomatrixserverlib/fclient"
|
2022-03-01 16:32:48 +00:00
|
|
|
|
|
|
|
type SpaceSummaryRoomsCache interface {
|
2023-04-06 08:55:01 +00:00
|
|
|
GetSpaceSummary(roomID string) (r fclient.MSC2946SpacesResponse, ok bool)
|
|
|
|
StoreSpaceSummary(roomID string, r fclient.MSC2946SpacesResponse)
|
2022-03-01 16:32:48 +00:00
|
|
|
}
|
|
|
|
|
2023-04-06 08:55:01 +00:00
|
|
|
func (c Caches) GetSpaceSummary(roomID string) (r fclient.MSC2946SpacesResponse, ok bool) {
|
2022-07-11 13:31:31 +00:00
|
|
|
return c.SpaceSummaryRooms.Get(roomID)
|
2022-03-01 16:32:48 +00:00
|
|
|
}
|
|
|
|
|
2023-04-06 08:55:01 +00:00
|
|
|
func (c Caches) StoreSpaceSummary(roomID string, r fclient.MSC2946SpacesResponse) {
|
2022-03-01 16:32:48 +00:00
|
|
|
c.SpaceSummaryRooms.Set(roomID, r)
|
|
|
|
}
|