aboutsummaryrefslogtreecommitdiff
path: root/internal/caching/cache_space_rooms.go
blob: 100ab9023e07b58bd8373a18b64a873e956f6138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package caching

import "github.com/matrix-org/gomatrixserverlib/fclient"

type SpaceSummaryRoomsCache interface {
	GetSpaceSummary(roomID string) (r fclient.MSC2946SpacesResponse, ok bool)
	StoreSpaceSummary(roomID string, r fclient.MSC2946SpacesResponse)
}

func (c Caches) GetSpaceSummary(roomID string) (r fclient.MSC2946SpacesResponse, ok bool) {
	return c.SpaceSummaryRooms.Get(roomID)
}

func (c Caches) StoreSpaceSummary(roomID string, r fclient.MSC2946SpacesResponse) {
	c.SpaceSummaryRooms.Set(roomID, r)
}