Painless Caching, Memoization for .NET

added by spoulson
2/10/2010 9:00:02 AM

890 Views

When searching for .NET discussions of I-don't-even-remember, I somehow came across Dustin Campbell's blog post about automatic memoization with C#. I instantly remembered first reading about this topic in Higher Order Perl, which at the time introduced me to this handy technique using the delegate pattern. After looking over Dustin's code, I liked the simplicity of wrapping any delegate with a single method call. This makes for an academic discussion, but I thought this could be much more practical if we abstracted the concept a bit more.


0 comments