moonpyk/mvcdonutcaching — pull request #10 by mlidbom (2013-11-16 02:39:00+00:00)
Title: Tests performance and automatic donuts

This is more a request for review than a pull request. The code seems to work, but is not "done".
What's to like:
* It just works: Add the new AutoOutputCache(preliminary name) attribute and you can trust that the policy is obeyed. No matter which .Action overload you use or how your action is invoked. The policy will_always_ simply work.
* More than 6 times faster. No kidding. Check out the load test controller :).
* NUnit test suite that tests the real output from a real MVC application and does some unit tests too.
* Works no matter what the parameter to your action. It need not be DataContractSerializer compatible.

What's not to like:
* Not compatible with distributed cache. Fixable I think(Obviously with complexities related to serializers etc.).
* Memory leaks are conceivable. (It stores the ControllerActionDescriptor including params without serializing them. Should a param regularly include something like an NHibernate entity with a ton of references..... )
* Not done/clean. It's in its own temporary folder/namespace : Mlidbo to keep it separate for now until I get your feedback. Not everything is clean code yet.
* Tests are primarily for the new "It just works" code.

Why: The reason I send you this without more polishing is that I've been working like mad to get this reasonably sane before our release(Too soon). In short the old code was just not reliable enough for us when nesting actions in a ton of different ways including sections, nested layouts, CMS infrastructure called actions etc. And we require the performance that caching gives us. So I've been working from the time I wake up to the time I go to sleep on this since we last talked (Local time here is half past three in the morning..).

I would really appreciate it if you could give me feedback on the code. More than anything it would be great if you could tell me about any gotchas that you think my code has not considered. Anything that might cause us grief in production.

Regards /Magnus