Set max age of 5 minutes for spaces summary cache
MODIFY
internal/caching/cache_space_rooms.go
internal/caching/cache_space_rooms.go
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 {

MODIFY
internal/caching/impl_inmemorylru.go
internal/caching/impl_inmemorylru.go
@@ -64,6 +64,7 @@ func NewInMemoryLRUCache(enablePrometheus bool) (*Caches, error) {
SpaceSummaryRoomsCacheName,
SpaceSummaryRoomsCacheMutable,
SpaceSummaryRoomsCacheMaxEntries,
+ SpaceSummaryRoomsCacheMaxAge,
enablePrometheus,
)
if err != nil {

Set max age of 5 minutes for spaces summary cache