Does setting the duration for OutputCache expire the cached values? Because if it does, I'm not seeing it.
[OutputCache(Duration = 1, Location = OutputCacheLocation.Client, VaryByParam = "none", NoStore = true)]
public ActionResult Index()
{
if (System.Web.HttpContext.Current.Cache["time"] == null)
{
System.Web.HttpContext.Current.Cache["time"] = DateTime.Now;
}
}
I'm new to using OutputCache so excuse the beginner question. But it was my understanding that by specifying the duration, something was suppose to happen after the allotted time. In my code snippet above, the time persists regardless of when I refresh my view.