aboutsummaryrefslogtreecommitdiff
path: root/internal/caching/caches.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-12-16 12:15:12 +0000
committerGitHub <noreply@github.com>2020-12-16 12:15:12 +0000
commitb891c00b09ed94d0fdfeb449df5e345c67208700 (patch)
treed6be6dbd5f422f3188401121c967fa3472e9097f /internal/caching/caches.go
parent90571430330afa887912f55fa6a3b329299d927e (diff)
Add RoomInfo cache, remove RoomServerRoomNIDsCache (#1646)
* Add RoomInfo cache, remove RoomServerRoomNID cache, ensure caches are thread-safe * Don't panic if the roomInfo isn't known yet * LRU package is already threadsafe * Use RoomInfo cache to find room version if possible in Events() * Adding comments about RoomInfoCache safety
Diffstat (limited to 'internal/caching/caches.go')
-rw-r--r--internal/caching/caches.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/caching/caches.go b/internal/caching/caches.go
index e7b7f550..f04d05d4 100644
--- a/internal/caching/caches.go
+++ b/internal/caching/caches.go
@@ -10,6 +10,7 @@ type Caches struct {
RoomServerEventTypeNIDs Cache // RoomServerNIDsCache
RoomServerRoomNIDs Cache // RoomServerNIDsCache
RoomServerRoomIDs Cache // RoomServerNIDsCache
+ RoomInfos Cache // RoomInfoCache
FederationEvents Cache // FederationEventsCache
}