MM-48181: Invalidate cache to reflect permissions changes from a team scheme. (#21735)
* MM-48181: Bust the allChannelMembersForUserCache when assigning a team scheme. * MM-48181: Tests cache fix.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
98a14c8c55
Коммит
3e7a8d8426
@@ -669,6 +669,21 @@ func (s *TimerLayerChannelStore) ClearCaches() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) ClearMembersForUserCache() {
|
||||
start := time.Now()
|
||||
|
||||
s.ChannelStore.ClearMembersForUserCache()
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if true {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.ClearMembersForUserCache", success, elapsed)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) ClearSidebarOnTeamLeave(userID string, teamID string) error {
|
||||
start := time.Now()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user