diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-03-07 09:37:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-07 09:37:00 -0500 |
commit | 33b8b72a026c54f121f1d0f0370d9ad2e6220a61 (patch) | |
tree | 005fe432e44b208a980f2b28a647e2ea48b6ed44 /app | |
parent | 115acb1fb1cef5dfe222af7f5ae02b5d1a9d9d4f (diff) | |
download | chat-33b8b72a026c54f121f1d0f0370d9ad2e6220a61.tar.gz chat-33b8b72a026c54f121f1d0f0370d9ad2e6220a61.tar.bz2 chat-33b8b72a026c54f121f1d0f0370d9ad2e6220a61.zip |
Adding index and cache to reactinos store (#5654)
Diffstat (limited to 'app')
-rw-r--r-- | app/web_hub.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/web_hub.go b/app/web_hub.go index 5b7e3623e..65d18481f 100644 --- a/app/web_hub.go +++ b/app/web_hub.go @@ -202,6 +202,18 @@ func InvalidateWebConnSessionCacheForUser(userId string) { } } +func InvalidateCacheForReactions(postId string) { + InvalidateCacheForReactionsSkipClusterSend(postId) + + if cluster := einterfaces.GetClusterInterface(); cluster != nil { + cluster.InvalidateCacheForReactions(postId) + } +} + +func InvalidateCacheForReactionsSkipClusterSend(postId string) { + Srv.Store.Reaction().InvalidateCacheForPost(postId) +} + func (h *Hub) Register(webConn *WebConn) { h.register <- webConn |