AddCacheItemDependency is used to clear OutputCache in Mono Apache MVC2 application using code below. This is described in Clearing Page Cache in ASP.NET
In Mono, OutputCache is not cleared. Looking into source code in GitHub shows that AddCacheItemDependency is not implemented in Mono. How to fix this so that OutputCache can cleared ?
Andrus.
[OutputCache(Duration = 3600, VaryByParam = "none")]
public ActionResult Index()
{
HttpContext.Current.Response.AddCacheItemDependency("Pages");
return View();
}
public ActionResult Refresh()
{
HttpRuntime.Cache.Insert( "Pages", DateTime.Now);
}
in Global.asax.cs:
protected void Application_Start()
{
HttpRuntime.Cache.Insert( "Pages", DateTime.Now);
}