mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-09 15:13:12 -06:00
Rename Invalite -> InvalidateLazyLoadedUser
This commit is contained in:
parent
93442c6558
commit
b889ae9bb0
|
|
@ -14,7 +14,7 @@ type lazyLoadingCacheKey struct {
|
|||
type LazyLoadCache interface {
|
||||
StoreLazyLoadedUser(device *userapi.Device, roomID, userID, eventID string)
|
||||
IsLazyLoadedUserCached(device *userapi.Device, roomID, userID string) (string, bool)
|
||||
Invalidate(device *userapi.Device, roomID, userID string)
|
||||
InvalidateLazyLoadedUser(device *userapi.Device, roomID, userID string)
|
||||
}
|
||||
|
||||
func (c Caches) StoreLazyLoadedUser(device *userapi.Device, roomID, userID, eventID string) {
|
||||
|
|
@ -35,7 +35,7 @@ func (c Caches) IsLazyLoadedUserCached(device *userapi.Device, roomID, userID st
|
|||
})
|
||||
}
|
||||
|
||||
func (c Caches) Invalidate(device *userapi.Device, roomID, userID string) {
|
||||
func (c Caches) InvalidateLazyLoadedUser(device *userapi.Device, roomID, userID string) {
|
||||
c.LazyLoading.Unset(lazyLoadingCacheKey{
|
||||
UserID: device.UserID,
|
||||
DeviceID: device.ID,
|
||||
|
|
|
|||
|
|
@ -104,12 +104,12 @@ func (p *PDUStreamProvider) CompleteSync(
|
|||
req.Log.WithError(err).Error("unable to update event filter with ignored users")
|
||||
}
|
||||
|
||||
// Invalidate the lazyLoadCache, otherwise we end up with missing displaynames/avatars
|
||||
// InvalidateLazyLoadedUser the lazyLoadCache, otherwise we end up with missing displaynames/avatars
|
||||
// TODO: This might be inefficient, when joined to many and/or large rooms.
|
||||
for _, roomID := range joinedRoomIDs {
|
||||
joinedUsers := p.notifier.JoinedUsers(roomID)
|
||||
for _, sharedUser := range joinedUsers {
|
||||
p.lazyLoadCache.Invalidate(req.Device, roomID, sharedUser)
|
||||
p.lazyLoadCache.InvalidateLazyLoadedUser(req.Device, roomID, sharedUser)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue