public async Task <IList <ProductDto> > Handle(GetProductsByCategoryIdQueryModel request, CancellationToken cancellationToken) { var userType = contextAccessor.HttpContext.User.GetUserType(); var result = await cache.GetOrCreateAsync(CacheKey.ProductsByCategory(request.CategoryId), s => productQueryService.GetAvailableByCategoryIdAsync(request.CategoryId), userType); return(result); }