1.9.4.Output Cache

  • Use OuputCache

          //Enable cahe
          //[OutputCache(Duration =50, Location = OutputCacheLocation.Server, VaryByParam ="")]
          //Disable cahe
          [OutputCache(Duration = 0, VaryByParam = "", NoStore = true)]
          public ActionResult Index()
          {
              return View();
          }

Last updated