diff options
author | Corey Hulen <corey@hulen.com> | 2016-12-13 19:23:36 -0800 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-12-14 00:23:36 -0300 |
commit | aacbe995483b694e169acdc63136171dff3725d9 (patch) | |
tree | e60e67a1378ce929f42e41a49c2215a0289eae78 /api | |
parent | 51b794501e21e1d19a58bb6dc273a5425c03a107 (diff) | |
download | chat-aacbe995483b694e169acdc63136171dff3725d9.tar.gz chat-aacbe995483b694e169acdc63136171dff3725d9.tar.bz2 chat-aacbe995483b694e169acdc63136171dff3725d9.zip |
PLT-4982 Adding caching to user profiles (#4782)
Diffstat (limited to 'api')
-rw-r--r-- | api/user.go | 2 | ||||
-rw-r--r-- | api/web_hub.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/api/user.go b/api/user.go index 0e74a577c..84d3641f2 100644 --- a/api/user.go +++ b/api/user.go @@ -2735,7 +2735,7 @@ func getProfilesByIds(c *Context, w http.ResponseWriter, r *http.Request) { return } - if result := <-Srv.Store.User().GetProfileByIds(userIds); result.Err != nil { + if result := <-Srv.Store.User().GetProfileByIds(userIds, true); result.Err != nil { c.Err = result.Err return } else { diff --git a/api/web_hub.go b/api/web_hub.go index cad77395b..ce11d26b0 100644 --- a/api/web_hub.go +++ b/api/web_hub.go @@ -118,6 +118,7 @@ func InvalidateCacheForUser(userId string) { func InvalidateCacheForUserSkipClusterSend(userId string) { Srv.Store.Channel().InvalidateAllChannelMembersForUser(userId) Srv.Store.User().InvalidateProfilesInChannelCacheByUser(userId) + Srv.Store.User().InvalidatProfileCacheForUser(userId) if len(hubs) != 0 { GetHubForUserId(userId).InvalidateUser(userId) |