diff options
Diffstat (limited to 'internal/caching/cache_roominfo.go')
-rw-r--r-- | internal/caching/cache_roominfo.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/internal/caching/cache_roominfo.go b/internal/caching/cache_roominfo.go index 60d22128..d03a6107 100644 --- a/internal/caching/cache_roominfo.go +++ b/internal/caching/cache_roominfo.go @@ -1,8 +1,6 @@ package caching import ( - "time" - "github.com/matrix-org/dendrite/roomserver/types" ) @@ -14,13 +12,6 @@ import ( // used from other components as we currently have no way to invalidate // the cache in downstream components. -const ( - RoomInfoCacheName = "roominfo" - RoomInfoCacheMaxEntries = 1024 - RoomInfoCacheMutable = true - RoomInfoCacheMaxAge = time.Minute * 5 -) - // RoomInfosCache contains the subset of functions needed for // a room Info cache. It must only be used from the roomserver only // It is not safe for use from other components. @@ -32,13 +23,7 @@ type RoomInfoCache interface { // GetRoomInfo must only be called from the roomserver only. It is not // safe for use from other components. func (c Caches) GetRoomInfo(roomID string) (types.RoomInfo, bool) { - val, found := c.RoomInfos.Get(roomID) - if found && val != nil { - if roomInfo, ok := val.(types.RoomInfo); ok { - return roomInfo, true - } - } - return types.RoomInfo{}, false + return c.RoomInfos.Get(roomID) } // StoreRoomInfo must only be called from the roomserver only. It is not |