Skip to content

Instantly share code, notes, and snippets.

@trnktms
Created November 2, 2020 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trnktms/ce66edfbb91983ddd1627df1c7d1e37d to your computer and use it in GitHub Desktop.
Save trnktms/ce66edfbb91983ddd1627df1c7d1e37d to your computer and use it in GitHub Desktop.
namespace Discovering.Sitecore10.Controllers.Caching
{
public class OutputCacheController : Controller
{
private readonly IOutputCacheService _outputCacheService;
public OutputCacheController(IOutputCacheService outputCacheService)
{
_outputCacheService = outputCacheService;
}
[HttpGet]
public IActionResult Clear()
{
// NOTE: Implement shared secret checking
_outputCacheService.SetLastCacheReload(DateTime.Now);
return Ok();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment