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.
Этот коммит содержится в:
Martin Kraft
2022-11-28 11:18:17 -05:00
коммит произвёл GitHub
родитель 98a14c8c55
Коммит 3e7a8d8426
8 изменённых файлов: 85 добавлений и 0 удалений

Просмотреть файл

@@ -451,6 +451,10 @@ var channelByNameCache = cache.NewLRU(cache.LRUOptions{
Size: model.ChannelCacheSize,
})
func (s SqlChannelStore) ClearMembersForUserCache() {
allChannelMembersForUserCache.Purge()
}
func (s SqlChannelStore) ClearCaches() {
allChannelMembersForUserCache.Purge()
allChannelMembersNotifyPropsForChannelCache.Purge()