public async Task <DistributionChartDataModel> GetDistributionChart(int currencyId, ChartDistributionCount count) { var cacheResult = await CacheService.GetOrSetHybridAsync(CacheKey.ExchangeDistributionChart(currencyId, count), TimeSpan.FromMinutes(2), async() => { using (var context = ExchangeDataContextFactory.CreateReadOnlyContext()) { var distributionData = await context.Balance .AsNoTracking() .Where(x => x.CurrencyId == currencyId && x.Total > 0 && !Constant.SYSTEM_ACCOUNTS.Contains(x.UserId)) .OrderByDescending(x => x.Total) .Take((int)count) .Select(x => x.Total) .ToListNoLockAsync().ConfigureAwait(false); return(new DistributionChartDataModel { Distribution = distributionData }); } }).ConfigureAwait(false); return(cacheResult); }