rename Cache service to OutputCache
This commit is contained in:
30
Oqtane.Server/Controllers/OutputCacheController.cs
Normal file
30
Oqtane.Server/Controllers/OutputCacheController.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Services;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
{
|
||||
[Route(ControllerRoutes.ApiRoute)]
|
||||
public class OutputCacheController : Controller
|
||||
{
|
||||
private readonly IOutputCacheService _cacheService;
|
||||
|
||||
public OutputCacheController(IOutputCacheService cacheService)
|
||||
{
|
||||
_cacheService = cacheService;
|
||||
}
|
||||
|
||||
// DELETE api/<controller>/{tag}
|
||||
[HttpDelete("{tag}")]
|
||||
[Authorize(Roles = RoleNames.Admin)]
|
||||
public async Task EvictByTag(string tag)
|
||||
{
|
||||
await _cacheService.EvictByTag(tag);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user