aboutsummaryrefslogtreecommitdiff
path: root/internal/caching/impl_inmemorylru.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/caching/impl_inmemorylru.go')
-rw-r--r--internal/caching/impl_inmemorylru.go33
1 files changed, 6 insertions, 27 deletions
diff --git a/internal/caching/impl_inmemorylru.go b/internal/caching/impl_inmemorylru.go
index f0915d7c..ccb92852 100644
--- a/internal/caching/impl_inmemorylru.go
+++ b/internal/caching/impl_inmemorylru.go
@@ -28,24 +28,6 @@ func NewInMemoryLRUCache(enablePrometheus bool) (*Caches, error) {
if err != nil {
return nil, err
}
- roomServerStateKeyNIDs, err := NewInMemoryLRUCachePartition(
- RoomServerStateKeyNIDsCacheName,
- RoomServerStateKeyNIDsCacheMutable,
- RoomServerStateKeyNIDsCacheMaxEntries,
- enablePrometheus,
- )
- if err != nil {
- return nil, err
- }
- roomServerEventTypeNIDs, err := NewInMemoryLRUCachePartition(
- RoomServerEventTypeNIDsCacheName,
- RoomServerEventTypeNIDsCacheMutable,
- RoomServerEventTypeNIDsCacheMaxEntries,
- enablePrometheus,
- )
- if err != nil {
- return nil, err
- }
roomServerRoomIDs, err := NewInMemoryLRUCachePartition(
RoomServerRoomIDsCacheName,
RoomServerRoomIDsCacheMutable,
@@ -74,18 +56,15 @@ func NewInMemoryLRUCache(enablePrometheus bool) (*Caches, error) {
return nil, err
}
go cacheCleaner(
- roomVersions, serverKeys, roomServerStateKeyNIDs,
- roomServerEventTypeNIDs, roomServerRoomIDs,
+ roomVersions, serverKeys, roomServerRoomIDs,
roomInfos, federationEvents,
)
return &Caches{
- RoomVersions: roomVersions,
- ServerKeys: serverKeys,
- RoomServerStateKeyNIDs: roomServerStateKeyNIDs,
- RoomServerEventTypeNIDs: roomServerEventTypeNIDs,
- RoomServerRoomIDs: roomServerRoomIDs,
- RoomInfos: roomInfos,
- FederationEvents: federationEvents,
+ RoomVersions: roomVersions,
+ ServerKeys: serverKeys,
+ RoomServerRoomIDs: roomServerRoomIDs,
+ RoomInfos: roomInfos,
+ FederationEvents: federationEvents,
}, nil
}