ASP.NET MVC: cache with non-cachable portions?

This is called donut caching The ASP. Net MVC framework doesn't currently support it, but it's planned for version 3.

This is called donut caching. The ASP. Net MVC framework doesn't currently support it, but it's planned for version 3.

To start things off, it might make sense to go through the page and see if there is anything about it that you can do to streamline or reduce the weight. Depending upon how bad things are, investing some time here might pay off in the long run. That said, in regards to trying to server the content to anonymous as well as logged in users, one option is to have two versions of the page: one for anonymous users and one for logged in users.

This may not be the best approach though as it means that you now have two versions of the same page to maintain. Given the lack of support doughnut caching mentioned by SLaks what I would likely do is try and cache the results of the calculations that are being done for the page (e.g. If you are querying a database for a table of data, cache a DataTable that you can check for before running the operation) and seeing what that does for the URL1 may not be the most elegant solution in the world, but it may solve the problems that you are having.

Edit: Yes the asp.net mvc OutputCache is just a wrapper . If you're using varyByParam="none" then you just invalidate "/Statistics" - that's if / are querystring values. This will invalidate all versions of the page.

I did a quick test and if you add varyByParam="id1" and then create multiple versions of the page - if you say invalidate invalidate "/Statistics/id1" it will invalidate just that version.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions