I am new to dapper (accually about to use it). I was wondering how it works. It caches some results, so it's faster to get it later on. On the github page, it does not says anything about releasing memory. I am aware of performance of this nuget, but isn't there any danger about memory overflow or sth? Is the cached memory released in some way sometimes?
The web tier often reached 100% CPU due to the volume of queries. With hundreds of calls per second, the CPU overhead from LINQ to SQL constructing a dynamic method for every call placed too much of a burden on the web servers.
To resolve this problem, Dapper.Net caches information about every query. This comprehensive caching helps it to generate objects from queries about twice as fast as LINQ to SQL. Currently caching is handled by two ConcurrentDictionary objects, which are never cleared. In the future the caching algorithm may use a LRU cache to reduce memory pressure.