views:

196

answers:

1

Hi folks,

after digging into this topic and having the requirement, that a single page should be totally cached, except for a

Html.RenderPartial("LogOnUserControl");

i couldn't find any working solution on this... the only "its getting warmer" solution i found was this one , which unfortunately is not working with a "partial view", which requires the

Request.IsAuthenticated

attribute ( the fakeContext is losing this info )

Have you heard of any ( other ) solution to cache a whole page except for a single "RenderPartial" call?!

A: 

Phil Haack has a great article on this that he calls Donut Caching.

Check it out at http://haacked.com/archive/2008/11/05/donut-caching-in-asp.net-mvc.aspx

nikmd23
Checked it already... this does also not work for "RenderPartial" and when i did some tests on it, it seems to me that the "Request" object was also cached ( or at least the last "Request.IsAuthenticated" value )
David
ASP.NET's implementation of Donut Caching is very much tied to WebForms, so the MVC pipeline does not support it. Note that the Html.Substitute() method was removed in MVC 2 Futures because it simply does not work correctly.
Levi
I didn't realize this Levi - thanks for the heads up
nikmd23
Ok, and there isn't any alternative?!
David