* Add webhook cache

* Add channel by name cache

* Fxing profiles in channels cache

* Fix merge
Этот коммит содержится в:
Joram Wilander
2017-01-27 14:07:34 -05:00
коммит произвёл GitHub
родитель 8eab04e944
Коммит 097289f8e4
19 изменённых файлов: 173 добавлений и 51 удалений

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

@@ -110,9 +110,6 @@ func CreatePost(post *model.Post, teamId string, triggerWebhooks bool) (*model.P
}
}
InvalidateCacheForChannel(rpost.ChannelId)
InvalidateCacheForChannelPosts(rpost.ChannelId)
if err := handlePostEvents(rpost, teamId, triggerWebhooks); err != nil {
return nil, err
}
@@ -139,6 +136,9 @@ func handlePostEvents(post *model.Post, teamId string, triggerWebhooks bool) *mo
channel = result.Data.(*model.Channel)
}
InvalidateCacheForChannel(channel)
InvalidateCacheForChannelPosts(channel.Id)
var user *model.User
if result := <-uchan; result.Err != nil {
return result.Err