1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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<IResultOutput> Clear(string cacheKey)
- {
- return await _cacheService.ClearAsync(cacheKey);
- }
- }
- }
|