views:

155

answers:

2

Hi guys, I am in the middle of implementing an application using ASP.NET MVC and would love to cache the data passed to user controls or the output rendering on some user controls that I render using the Html.RenderPartial, that way I don't have to query the DB with every request I do to the controller for a new view.

Thanks.

+1  A: 

That appears to be one of those 1 million dollar questions!

It seems that a lot of people are having that problem, but the solution is not trivial.

Check out an issue reported recently on the ASP.NET MVC Codeplex site...

Elijah Manor
A: 

I would maybe suggest using the sub controllers from the MVC Contrib and then caching the controller's method using the OutputCache stuff.

rball