private async Task <List <CmdrStats> > GetCmdrStats(bool player) { string memoryKey = player ? "cmdrstatsplayer" : "cmdrstats"; List <CmdrStats> stats; if (!memoryCache.TryGetValue(memoryKey, out stats)) { stats = await StatsService.GetStats(context, player); memoryCache.Set(memoryKey, stats, CacheService.RankingCacheOptions); cacheService.AddHashKey(memoryKey); } return(stats); }