toptensoftware/PetaPoco — pull request #129 by kohenkatz (2012-06-28 19:55:10+00:00)
Title: Switch to ConcurrentDictionary instead of Homemade Cache class

Since PetaPoco v5 will require .NET 4 anyway, I think we should be using the built-in `ConcurrentDictionary` instead of wrapping a regular `Dictionary` in a locking mechanism.

There are several benefits to this, including that .NET 4.5 (to be released soon) has significant performance improvements for `ConcurrentDictionary`.

The one major change is that `Cache` took a `Func` as the second argument of the `Get` method but the equivalent `GetOrAdd` method of `ConcurrentDictionary` takes a `Func`. Right now, each place that uses this just has an unused parameter named `_`.