public static async Task <Session> GetSession(long accountServerId) { var db = ConnectionMultiplexerHolder.Instance.Redis.GetDatabase(); var redisValue = await db.StringGetAsync(SessionKey(accountServerId)); return(redisValue.HasValue ? JsonService.DeserializeFromDB <Session>(redisValue) : null); }