1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Admin.Core.Common.Output;
- using Admin.Core.Service.Admin.Cache;
- using Microsoft.AspNetCore.Mvc;
- using System.Threading.Tasks;
- namespace Admin.Core.Controllers.Admin
- {
-
-
-
- public class CacheController : AreaController
- {
- private readonly ICacheService _cacheService;
- public CacheController(ICacheService cacheService)
- {
- _cacheService = cacheService;
- }
-
-
-
-
- [HttpGet]
- public IResponseOutput List()
- {
- return _cacheService.List();
- }
-
-
-
-
-
- [HttpDelete]
- public async Task<IResponseOutput> Clear(string cacheKey)
- {
- return await _cacheService.ClearAsync(cacheKey);
- }
- }
- }
|