Commit e739cb13 authored by George Goldberg's avatar George Goldberg

MM-12419: Flush channels from cache when deleted/restored. (#9625)

parent d5b613cb
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment