using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Blog.Core.Common;
using Blog.Core.Common.Helper;
using Blog.Core.IServices;
using Blog.Core.Model;
using Blog.Core.Model.Models;
using Blog.Core.SwaggerHelper;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using StackExchange.Profiling;
using static Blog.Core.SwaggerHelper.CustomApiVersion;
namespace Blog.Core.Controllers
{
///
/// 博客管理
///
[Produces("application/json")]
[Route("api/Blog")]
[Authorize]
public class BlogController : Controller
{
readonly IBlogArticleServices _blogArticleServices;
readonly IRedisCacheManager _redisCacheManager;
private readonly ILogger _logger;
///
/// 构造函数
///
///
///
public BlogController(IBlogArticleServices blogArticleServices, IRedisCacheManager redisCacheManager, ILogger logger)
{
_blogArticleServices = blogArticleServices;
_redisCacheManager = redisCacheManager;
_logger = logger;
}
///
/// 获取博客列表【无权限】
///
///
///
///
///
///
[HttpGet]
[AllowAnonymous]
//[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
//[ResponseCache(Duration = 600)]
public async Task