using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using ZhonTai.Common.Domain.Dto;
using ZhonTai.Plate.Admin.Service.Cache;
namespace ZhonTai.Plate.Admin.HttpApi
{
///
/// 缓存管理
///
public class CacheController : AreaController
{
private readonly ICacheService _cacheService;
public CacheController(ICacheService cacheService)
{
_cacheService = cacheService;
}
///
/// 获取缓存列表
///
///
[HttpGet]
public IResultOutput List()
{
return _cacheService.GetList();
}
///
/// 清除缓存
///
///
///
[HttpDelete]
public async Task Clear(string cacheKey)
{
return await _cacheService.ClearAsync(cacheKey);
}
}
}