mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
More flexible caching (#1101)
This commit is contained in:
parent
76ff47c052
commit
e7b19d2c70
16 changed files with 189 additions and 142 deletions
4
serverkeyapi/storage/cache/keydb.go
vendored
4
serverkeyapi/storage/cache/keydb.go
vendored
|
@ -12,10 +12,10 @@ import (
|
|||
// the public keys for other matrix servers.
|
||||
type KeyDatabase struct {
|
||||
inner gomatrixserverlib.KeyDatabase
|
||||
cache caching.ImmutableCache
|
||||
cache caching.ServerKeyCache
|
||||
}
|
||||
|
||||
func NewKeyDatabase(inner gomatrixserverlib.KeyDatabase, cache caching.ImmutableCache) (*KeyDatabase, error) {
|
||||
func NewKeyDatabase(inner gomatrixserverlib.KeyDatabase, cache caching.ServerKeyCache) (*KeyDatabase, error) {
|
||||
if inner == nil {
|
||||
return nil, errors.New("inner database can't be nil")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue