views:

288

answers:

1

I am having an issue with caching the home page of my Asp.Net Mvc App.

All the other pages cache fine using the [OutputCache(Duration=60, VaryByParam="None")] action filter.

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

Any ideas?

+4  A: 

What version of asp.net-mvc are you using? If it's the latest release then you might 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 which i think handles caching of "/"....

Mark
oooh! tricky. where did u hear about this?
Pure.Krome
I was running RTM but I started the project using Preview 5 and I didn't update the default.aspx.cs page. Thank again
Sruly