I am caching something with:
var htmlHEAD = _cacheManager.Get(THE_CACHE_KEY, ctx =>
{
ctx.Monitor(_clock.When(TimeSpan.FromMinutes(60)));
return getTenantSpecificHeadHTMLFromDB()
});
However, I want to be able to hit a URL and purge the cache if a quick change is ever needed.
eg. this is in AdminController.
public ActionResult purgeCache() {
_cacheMangager.PurgeCache(THE_CACHE_KEY); //this doesn't exist :(
return Content("OK");
}
How can I do this?