mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-25 13:11:37 +00:00
Set max age of 5 minutes for spaces summary cache
This commit is contained in:
parent
bb2380c254
commit
8e82739d77
@ -1,11 +1,16 @@
|
|||||||
package caching
|
package caching
|
||||||
|
|
||||||
import "github.com/matrix-org/gomatrixserverlib"
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SpaceSummaryRoomsCacheName = "space_summary_rooms"
|
SpaceSummaryRoomsCacheName = "space_summary_rooms"
|
||||||
SpaceSummaryRoomsCacheMaxEntries = 100
|
SpaceSummaryRoomsCacheMaxEntries = 100
|
||||||
SpaceSummaryRoomsCacheMutable = true
|
SpaceSummaryRoomsCacheMutable = true
|
||||||
|
SpaceSummaryRoomsCacheMaxAge = time.Minute * 5
|
||||||
)
|
)
|
||||||
|
|
||||||
type SpaceSummaryRoomsCache interface {
|
type SpaceSummaryRoomsCache interface {
|
||||||
|
@ -64,6 +64,7 @@ func NewInMemoryLRUCache(enablePrometheus bool) (*Caches, error) {
|
|||||||
SpaceSummaryRoomsCacheName,
|
SpaceSummaryRoomsCacheName,
|
||||||
SpaceSummaryRoomsCacheMutable,
|
SpaceSummaryRoomsCacheMutable,
|
||||||
SpaceSummaryRoomsCacheMaxEntries,
|
SpaceSummaryRoomsCacheMaxEntries,
|
||||||
|
SpaceSummaryRoomsCacheMaxAge,
|
||||||
enablePrometheus,
|
enablePrometheus,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user