From 097289f8e473c799ee752aa56e08f605110f5217 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 27 Jan 2017 14:07:34 -0500 Subject: Merge 3.6.2 into master (#5211) * Add webhook cache * Add channel by name cache * Fxing profiles in channels cache * Fix merge --- app/post.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/post.go') diff --git a/app/post.go b/app/post.go index 6d34cc035..d7bc2cf71 100644 --- a/app/post.go +++ b/app/post.go @@ -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 -- cgit v1.2.3-1-g7c22