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