0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-13 22:23:10 +01:00

Set max age of 5 minutes for spaces summary cache

This commit is contained in:
Neil Alexander 2022-03-01 17:01:08 +00:00
parent bb2380c254
commit 8e82739d77
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 7 additions and 1 deletions

View file

@ -1,11 +1,16 @@
package caching
import "github.com/matrix-org/gomatrixserverlib"
import (
"time"
"github.com/matrix-org/gomatrixserverlib"
)
const (
SpaceSummaryRoomsCacheName = "space_summary_rooms"
SpaceSummaryRoomsCacheMaxEntries = 100
SpaceSummaryRoomsCacheMutable = true
SpaceSummaryRoomsCacheMaxAge = time.Minute * 5
)
type SpaceSummaryRoomsCache interface {

View file

@ -64,6 +64,7 @@ func NewInMemoryLRUCache(enablePrometheus bool) (*Caches, error) {
SpaceSummaryRoomsCacheName,
SpaceSummaryRoomsCacheMutable,
SpaceSummaryRoomsCacheMaxEntries,
SpaceSummaryRoomsCacheMaxAge,
enablePrometheus,
)
if err != nil {