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