mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
MM-12419: Flush channels from cache when deleted/restored. (#9625)
This commit is contained in:
parent
481d83a1e7
commit
5726d3919d
2 changed files with 4 additions and 0 deletions
|
|
@ -660,6 +660,8 @@ func (s SqlChannelStore) Restore(channelId string, time int64) store.StoreChanne
|
|||
// @see ChannelStoreExperimental for how this update propagates to the PublicChannels table.
|
||||
func (s SqlChannelStore) SetDeleteAt(channelId string, deleteAt, updateAt int64) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
defer s.InvalidateChannel(channelId)
|
||||
|
||||
transaction, err := s.GetMaster().Begin()
|
||||
if err != nil {
|
||||
result.Err = model.NewAppError("SqlChannelStore.SetDeleteAt", "store.sql_channel.set_delete_at.open_transaction.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
|
|
|
|||
|
|
@ -283,6 +283,8 @@ func (s SqlChannelStoreExperimental) SetDeleteAt(channelId string, deleteAt, upd
|
|||
}
|
||||
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
defer s.InvalidateChannel(channelId)
|
||||
|
||||
transaction, err := s.GetMaster().Begin()
|
||||
if err != nil {
|
||||
result.Err = model.NewAppError("SqlChannelStoreExperimental.SetDeleteAt", "store.sql_channel.set_delete_at.open_transaction.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
|
|
|
|||
Loading…
Reference in a new issue