Output cache in MVC

How can I get dropbox items in cache, in MVC?

I tried the following but it calls the page function every time.

What could be the problem or the right way?

Please suggest.

[OutputCache(Duration = 10, Location = System.Web.UI.OutputCacheLocation.Server,
      NoStore = true, Order = 0)]
    public IEnumerable<SelectListItem> GetRegions()
    {

      

+1


source to share


1 answer


You should have this in your controller on these actions there



+1


source







All Articles