I want to apply output cache programmatically to a particular control. But when I'm using this code, it stores all the page and other user control in cache output.
if (Session["id"] != null)
{
Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetValidUntilExpires(true);
}