I am new to dapper and plan to use it on my new project. After reading it, seems like the only problem I might have is ConcurrentDictionary.
Dapper caches information about every query it runs, this allow it to materialize objects quickly and process parameters quickly. The current implementation caches this information in a ConcurrentDictionary object. The objects it stores are never flushed. If you are generating SQL strings on the fly without using parameters it is possible you will hit memory issues. We may convert the dictionaries to an LRU Cache.
How do I avoid this problem? Can someone please show me some code tell me how and when to flush it?
StringBuilder
? Or is it more of a constant string declared likevar sql = @"SELECT Foo FROM Bar"
? – Kirk Woll May 4 '12 at 19:57