I'm using ASP.NET MVC3.
I've used Output Caching on controller method.
[OutputCache(Duration = 3660, VaryByParam = "none")]
public ActionResult Index()
{
some code;
return View();
}
I want to put dynamic duration using some static variable or something else in Output Caching.
How can i do this?
CacheConfig.Duration
at runtime won't magically re-execute your constructor – Claimant