mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-20 10:03:40 +00:00
419ff150d4
* Use gomatrixserverlib key caching * Implement key caching wrapper * Add caching wrapper in BaseComponent * Review comments
15 lines
553 B
Go
15 lines
553 B
Go
package caching
|
|
|
|
import "github.com/matrix-org/gomatrixserverlib"
|
|
|
|
const (
|
|
RoomVersionMaxCacheEntries = 128
|
|
ServerKeysMaxCacheEntries = 128
|
|
)
|
|
|
|
type ImmutableCache interface {
|
|
GetRoomVersion(roomId string) (gomatrixserverlib.RoomVersion, bool)
|
|
StoreRoomVersion(roomId string, roomVersion gomatrixserverlib.RoomVersion)
|
|
GetServerKey(request gomatrixserverlib.PublicKeyLookupRequest) (gomatrixserverlib.PublicKeyLookupResult, bool)
|
|
StoreServerKey(request gomatrixserverlib.PublicKeyLookupRequest, response gomatrixserverlib.PublicKeyLookupResult)
|
|
}
|