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