func setCachedCurrentUser(s *bitmonster.Socket, user *User) { // Set the socket value. s.SetValue(cacheUserSocketValueKey, user) // Remove the cached value after the timeout. s.DeleteValueAfterTimeout(cacheUserSocketValueKey, clearCacheInterval) }