Cache Asp.net Mvc Home Page

I am having a problem caching the home page of my Asp.Net Mvc application.

All other page caching is fine using the [OutputCache (Duration = 60, VaryByParam = "None")] filter.

The problem is that the home page is not caching. I noticed that if I access the home page via Controller / Action ("Home / Index") it is cached, but when accessed via "/" it doesn't work.

Any ideas?

0


a source to share


1 answer


Which version of asp.net-mvc are you using? If this is the latest version, you may need to create a new project and copy the Page_Load method from "Default.aspx", which is different in later versions and has a slight change that I think handles caching "/" ....



+4


a source







All Articles