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