You can use RenderAction instead. Example:
public class HomeController : Controller { public ActionResult Index() { return View(); } public ActionResult About() { return View(); } [OutputCache(Duration = 6000, VaryByParam = "none")] public ActionResult Cached() {
and inside the Index.cshtml and About.cshtml you can include a child action:
<div> @{Html.RenderAction("Cached");} </div>
and you will get its cached version on both pages.
Darin Dimitrov
source share