diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-12-22 07:52:02 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-12-22 07:52:02 -0500 |
commit | c434e84114ef14b7a53ad25c658aaf5156f6d949 (patch) | |
tree | d5b26a01be90e80ef29e4be6cf5c0cdfdb571b96 /api/web_hub.go | |
parent | 64a86bd32f82b8c9c943c38949f6f7e105bcd54e (diff) | |
download | chat-c434e84114ef14b7a53ad25c658aaf5156f6d949.tar.gz chat-c434e84114ef14b7a53ad25c658aaf5156f6d949.tar.bz2 chat-c434e84114ef14b7a53ad25c658aaf5156f6d949.zip |
Adding session cache directly to web-conn (#4861)
Diffstat (limited to 'api/web_hub.go')
-rw-r--r-- | api/web_hub.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/api/web_hub.go b/api/web_hub.go index 107491434..64903ea59 100644 --- a/api/web_hub.go +++ b/api/web_hub.go @@ -145,6 +145,12 @@ func InvalidateCacheForUserSkipClusterSend(userId string) { } } +func InvalidateWebConnSessionCacheForUser(userId string) { + if len(hubs) != 0 { + GetHubForUserId(userId).InvalidateUser(userId) + } +} + func (h *Hub) Register(webConn *WebConn) { h.register <- webConn |