mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-10 06:53:00 +00:00
f0e0a6668f
* Add prom metrics for the in-memory LRU cache * Increase cache sizes
18 lines
560 B
Go
18 lines
560 B
Go
package caching
|
|
|
|
import (
|
|
"github.com/matrix-org/gomatrixserverlib"
|
|
)
|
|
|
|
const (
|
|
RoomVersionMaxCacheEntries = 1024
|
|
ServerKeysMaxCacheEntries = 1024
|
|
)
|
|
|
|
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)
|
|
}
|