mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22:26 +03:00
Implement key caching directly (#1038)
* Use gomatrixserverlib key caching * Implement key caching wrapper * Add caching wrapper in BaseComponent * Review comments
This commit is contained in:
parent
7ca230e931
commit
419ff150d4
7 changed files with 108 additions and 27 deletions
|
@ -4,9 +4,12 @@ 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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue