2020-04-22 12:00:05 +00:00
|
|
|
package caching
|
|
|
|
|
|
|
|
import "github.com/matrix-org/gomatrixserverlib"
|
|
|
|
|
|
|
|
const (
|
|
|
|
RoomVersionMaxCacheEntries = 128
|
2020-05-15 08:32:40 +00:00
|
|
|
ServerKeysMaxCacheEntries = 128
|
2020-04-22 12:00:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ImmutableCache interface {
|
|
|
|
GetRoomVersion(roomId string) (gomatrixserverlib.RoomVersion, bool)
|
|
|
|
StoreRoomVersion(roomId string, roomVersion gomatrixserverlib.RoomVersion)
|
2020-05-15 08:32:40 +00:00
|
|
|
GetServerKey(request gomatrixserverlib.PublicKeyLookupRequest) (gomatrixserverlib.PublicKeyLookupResult, bool)
|
|
|
|
StoreServerKey(request gomatrixserverlib.PublicKeyLookupRequest, response gomatrixserverlib.PublicKeyLookupResult)
|
2020-04-22 12:00:05 +00:00
|
|
|
}
|