Caching ChildActions using cache profiles won’t work?

I did some digging on a related question and looking at mvc 3 source, they definitely don’t support any attribute other than Duration and VaryByParam. The main bug with their current implementation is that if you don’t supply either one of these you will get an exception telling you to supply that, instead of an exception say that what you tried to use is not supported. The other major issue was that they will cache even if you turn off caching in the web.config, which seems really lame and not right.

The biggest issue I had with it all is that they are using the same attribute which works in both views and partial views, but in reality it should probably be 2 different attributes since the partial view is so limited and behaves a lot differently, at least in it’s current implementation.

Leave a Comment