public async Task <IList <ProductWithDiscountDto> > Handle(GetProductsWithDiscountByCategoryIdQueryModel request, CancellationToken cancellationToken) { var userType = httpContextAccessor.HttpContext.User.GetUserType(); return(await cache.GetOrCreateAsync(CacheKey.ProductsWithDiscounts(request.CategoryId), s => productQueryService.GetAvailableWithDiscountByCategoryIdAsync(request.CategoryId), userType)); }