MM-60478: Do not invalidate session cache on user added to channel (#28142)

PR: https://github.com/mattermost/mattermost/pull/27204 fixed the issue
where `invalidateWebConnSessionCacheForUser` was not broadcasted across
the cluster. However, we became too conservative and started to invalidate
the session cache as well.

But the session cache only contains the session details for the user
and the team membership. There is no channel membership related info.

Therefore, we avoid that and improve performance as well.

https://mattermost.atlassian.net/browse/MM-60478

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Agniva De Sarker
2024-09-11 20:42:49 +05:30
коммит произвёл GitHub
родитель d9e47522a0
Коммит b9debc75a0
4 изменённых файлов: 22 добавлений и 19 удалений

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

@@ -467,7 +467,7 @@ func New(ps *platform.PlatformService, driver, dataSource string) *MetricsInterf
model.ClusterEventInvalidateCacheForChannel,
model.ClusterEventInvalidateCacheForChannelGuestCount,
model.ClusterEventInvalidateCacheForUser,
model.ClusterEventInvalidateCacheForUserTeams,
model.ClusterEventInvalidateWebConnCacheForUser,
model.ClusterEventClearSessionCacheForUser,
model.ClusterEventInvalidateCacheForRoles,
model.ClusterEventInvalidateCacheForRolePermissions,