public virtual async Task <IActionResult> GetThread(string categoryName, int page = 1, bool showDeleted = false)
        {
            var category = categoriesCache.GetCategory(categoryName);

            if (category == null)
            {
                return(BadRequest());
            }

            if (!authorizationService.HasAccess(User.Roles, category, OperationKeys.MaterialAndCommentsRead))
            {
                return(Unauthorized());
            }

            var options = new MaterialsShowOptions
            {
                CategoryId = category.Id,
                Page       = page,
                PageSize   = forumOptions.CurrentValue.ThreadMaterialsPageSize
            };

            if (authorizationService.HasAccess(User.Roles, category, OperationKeys.MaterialHide))
            {
                options.ShowHidden = true;
            }

            if (showDeleted && authorizationService.HasAccess(User.Roles, category, OperationKeys.MaterialDeleteAny))
            {
                options.ShowDeleted = true;
            }

            async Task <IPagedList <TopicInfoView> > LoadDataAsync()
            {
                return(await forumPresenter.GetThreadAsync(options));
            }

            if (showDeleted)
            {
                return(Ok(await LoadDataAsync()));
            }

            return(await CacheContentAsync(category, category.Id, LoadDataAsync, page));
        }