summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-03-07 09:37:00 -0500
committerGitHub <noreply@github.com>2017-03-07 09:37:00 -0500
commit33b8b72a026c54f121f1d0f0370d9ad2e6220a61 (patch)
tree005fe432e44b208a980f2b28a647e2ea48b6ed44 /app
parent115acb1fb1cef5dfe222af7f5ae02b5d1a9d9d4f (diff)
downloadchat-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.go12
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